Antiwar — антивоенное сопротивление
antiwarwiki
https://antiwar.miraheze.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0
MediaWiki 1.40.1
first-letter
Медиа
Служебная
Обсуждение
Участник
Обсуждение участника
Antiwar — антивоенное сопротивление
Обсуждение Antiwar — антивоенное сопротивление
Файл
Обсуждение файла
MediaWiki
Обсуждение MediaWiki
Шаблон
Обсуждение шаблона
Справка
Обсуждение справки
Категория
Обсуждение категории
Форма
Обсуждение формы
Видео
Обсуждение видео
Campaign
Campaign talk
TimedText
TimedText talk
Модуль
Обсуждение модуля
PagePropertiesForm
PagePropertiesForm talk
Инкубатор
Обсуждение Инкубатора
Заглавная страница
0
2
2
2022-07-19T11:17:58Z
CyberTailor
2
Первая правка
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение #НЕТВОЙНЕ]]
41053df280037321186e2ad4dfeab47c00a5b494
28
2
2022-07-19T13:17:56Z
CyberTailor
2
/* Региональные организации */ фикс ссылки
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
7846cec9124b8a36d26d9edb275afe318da3472c
32
28
2022-07-19T14:22:24Z
CyberTailor
2
Раздел "Агитация"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Надпись]]
* [[Граффити]]
c0ce2f25c9d4b936c02fa9bc48c316448c919a9a
45
32
2022-07-19T16:35:39Z
CyberTailor
2
Раздел "Медиапроекты"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Медиапроекты ==
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Надпись]]
* [[Граффити]]
daf8e99533966185d3d9debcd797ac82893fd5d7
Категория:Региональные антивоенные организации
14
3
3
2022-07-19T11:22:22Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Шаблон:РегОрг
10
4
4
2022-07-19T11:33:52Z
CyberTailor
2
Новаый шаблон
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="image" />
<title source="name"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Регион"><label>Регион</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Вебсайт</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Региональные антивоенные организации]]}}<noinclude>{{Documentation}}</noinclude>
df370d15e34f3311321bea5b43096bc11051f2bb
5
4
2022-07-19T11:36:35Z
CyberTailor
2
Русификация
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Регион"><label>Регион</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Вебсайт</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Региональные антивоенные организации]]}}<noinclude>{{Documentation}}</noinclude>
6ba7b08e8b0b77f4f95f2029b0bc8154b451a7e7
Шаблон:Канал
10
5
6
2022-07-19T11:42:04Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
[https://t.me/{{{1}}} @{{{1}}}]<noinclude>{{Documentation}}</noinclude>
60dd45c807a42b230193aa301f80c18d2cf3d5b9
Шаблон:Примечания
10
6
7
2022-07-19T12:13:02Z
CyberTailor
2
импорт шаблона
wikitext
text/x-wiki
<div class="reflist {{#if: {{{colwidth|}}}
| columns
| {{#if: {{{1|}}}
| {{#iferror: {{#ifexpr: {{{1}}} > 1 }}
| {{#switch: {{{1}}}
| узкие = columns reflist-narrow
| широкие = columns reflist-wide
| #default = columns<!-- 30em & invalid params -->
}}
| {{#switch: {{{1}}}
| 1 =
| 2 | 3 = columns
| #default = columns reflist-narrow
}}
}}
| columns
}}
}}" style="{{#if: {{{colwidth|}}}
| column-width:{{{colwidth}}};
| {{#if: {{{1|}}}
| {{#iferror: {{#ifexpr: {{{1}}} > 1 }}
| {{#switch: {{{1}}}
| узкие | широкие =
| #default = column-width:{{{1}}};
}}
}}
}}
}} list-style-type: {{{liststyle|{{#switch: {{{group|}}}
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = {{{group}}}
| #default = decimal
}}}}};">
{{#tag: references |{{{refs|}}}| group = {{{group|{{{группа|}}}}}} | responsive = {{#if: {{{colwidth|}}}
| 0
| {{#if: {{{1|}}}
| {{#iferror: {{#expr: {{{1}}} > 1 }}
| {{#switch: {{{1}}}
| узкие | широкие = 1
| #default = 0<!-- 30em & invalid params -->
}}
| {{#switch: {{{1}}}
| 1 = 0
| #default = 1
}}
}}
| 1
}}
}}
}}</div>{{#invoke: Check for unknown parameters | check
| unknown = {{#if: {{NAMESPACE}} || [[Категория:Страницы с некорректным использованием шаблонов:Примечания|_VALUE_{{PAGENAME}}]] }}
| preview = Страница использует [[Шаблон:Примечания]] с неизвестным параметром «_VALUE_»
| ignoreblank = y
| 1 | colwidth | group | liststyle | refs
}}<noinclude>{{Documentation}}</noinclude>
3f29b2048ca7cd69abf17ea549572c15d6942685
8
7
2022-07-19T12:14:09Z
CyberTailor
2
минус проверка
wikitext
text/x-wiki
<div class="reflist {{#if: {{{colwidth|}}}
| columns
| {{#if: {{{1|}}}
| {{#iferror: {{#ifexpr: {{{1}}} > 1 }}
| {{#switch: {{{1}}}
| узкие = columns reflist-narrow
| широкие = columns reflist-wide
| #default = columns<!-- 30em & invalid params -->
}}
| {{#switch: {{{1}}}
| 1 =
| 2 | 3 = columns
| #default = columns reflist-narrow
}}
}}
| columns
}}
}}" style="{{#if: {{{colwidth|}}}
| column-width:{{{colwidth}}};
| {{#if: {{{1|}}}
| {{#iferror: {{#ifexpr: {{{1}}} > 1 }}
| {{#switch: {{{1}}}
| узкие | широкие =
| #default = column-width:{{{1}}};
}}
}}
}}
}} list-style-type: {{{liststyle|{{#switch: {{{group|}}}
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman = {{{group}}}
| #default = decimal
}}}}};">
{{#tag: references |{{{refs|}}}| group = {{{group|{{{группа|}}}}}} | responsive = {{#if: {{{colwidth|}}}
| 0
| {{#if: {{{1|}}}
| {{#iferror: {{#expr: {{{1}}} > 1 }}
| {{#switch: {{{1}}}
| узкие | широкие = 1
| #default = 0<!-- 30em & invalid params -->
}}
| {{#switch: {{{1}}}
| 1 = 0
| #default = 1
}}
}}
| 1
}}
}}
}}</div><noinclude>{{Documentation}}</noinclude>
c998e83ec85804981c8516312eeb50bd118b7c23
Шаблон:Cite web
10
7
9
2022-07-19T12:15:54Z
CyberTailor
2
импорт шаблона
wikitext
text/x-wiki
<includeonly>{{#invoke:citation/CS1|citation
|CitationClass=web
}}</includeonly><noinclude>
{{documentation}}
{{En-WP attribution notice|Template:Cite web}}
</noinclude>
3346631c4b8024c3a949b31545107af19adc1c27
Шаблон:En-WP attribution notice
10
8
10
2022-07-19T12:17:42Z
CyberTailor
2
импорт шаблона
wikitext
text/x-wiki
<includeonly>{| style="border: 1px solid #e0e0e0; background-color: #f8f8f8; color:black; margin: 5px auto; width: 60%;"
|-
| style="padding: 3px 10px;" | [[File:Wikipedia-logo-v2.svg|30px|Wikipedia logo]]
| style="font-size: 90%; padding: 3px;" | This {{Pagetype}} uses material from the Wikipedia {{Pagetype|page={{{1|{{FULLPAGENAME}}}}}}} [[w:en:{{{1|{{FULLPAGENAME}}}}}|{{{1|{{FULLPAGENAME}}}}}]], which is released under the [[w:en:Wikipedia:Text of Creative Commons Attribution-ShareAlike 3.0 Unported License|Creative Commons Attribution-ShareAlike 3.0 Unported License]] ([https://en.wikipedia.org/w/index.php?title={{urlencode:{{{1|{{FULLPAGENAME}}}}}}}&action=history view authors]).
|}
[[Category:{{Pagetype|category=Categorie}}s from English Wikipedia]]</includeonly>
<noinclude>
{{documentation}}
[[Category:Attribution templates]]
{{En-WP attribution notice|Template:En-WP attribution notice}}
</noinclude>
2f8572b5c25751c527d33ac2122cfc3cdcc7d622
11
10
2022-07-19T12:19:03Z
CyberTailor
2
удаления
wikitext
text/x-wiki
<includeonly>{| style="border: 1px solid #e0e0e0; background-color: #f8f8f8; color:black; margin: 5px auto; width: 60%;"
|-
| style="padding: 3px 10px;" | [[File:Wikipedia-logo-v2.svg|30px|Wikipedia logo]]
| style="font-size: 90%; padding: 3px;" | This {{Pagetype}} uses material from the Wikipedia {{Pagetype|page={{{1|{{FULLPAGENAME}}}}}}} [[w:en:{{{1|{{FULLPAGENAME}}}}}|{{{1|{{FULLPAGENAME}}}}}]], which is released under the [[w:en:Wikipedia:Text of Creative Commons Attribution-ShareAlike 3.0 Unported License|Creative Commons Attribution-ShareAlike 3.0 Unported License]] ([https://en.wikipedia.org/w/index.php?title={{urlencode:{{{1|{{FULLPAGENAME}}}}}}}&action=history view authors]).
|}
[[Категория:{{Pagetype|category=Categorie}}s from English Wikipedia]]</includeonly>
<noinclude>
{{documentation}}
{{En-WP attribution notice|Шаблон:En-WP attribution notice}}
</noinclude>
6f5dfecd92fb6bed6796f3014c746aff60766849
Модуль:Citation/CS1
828
9
12
2022-07-19T12:20:32Z
CyberTailor
2
import module
Scribunto
text/plain
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local dates, year_date_check, reformat_dates, date_hyphen_to_dash, -- functions in Module:Citation/CS1/Date_validation
date_name_xlate
local is_set, in_array, substitute, error_comment, set_error, select_one, -- functions in Module:Citation/CS1/Utilities
add_maint_cat, wrap_style, safe_for_italics, is_wikilink, make_wikilink,
strip_apostrophe_markup;
local z ={}; -- tables in Module:Citation/CS1/Utilities
local extract_ids, extract_id_access_levels, build_id_list, is_embargoed; -- functions in Module:Citation/CS1/Identifiers
local make_coins_title, get_coins_pages, COinS; -- functions in Module:Citation/CS1/COinS
local cfg = {}; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration
local whitelist = {}; -- table of tables listing valid template parameter names; defined in Module:Citation/CS1/Whitelist
--[[--------------------------< P A G E S C O P E V A R I A B L E S >--------------------------------------
delare variables here that have page-wide scope that are not brought in from other modules; thatare created here
and used here
]]
local added_deprecated_cat; -- boolean flag so that the category is added only once
local added_prop_cats = {}; -- list of property categories that have been added to z.properties_cats
local added_vanc_errs; -- boolean flag so we only emit one Vancouver error / category
local Frame; -- holds the module's frame table
--[[--------------------------< F I R S T _ S E T >------------------------------------------------------------
Locates and returns the first set value in a table of values where the order established in the table,
left-to-right (or top-to-bottom), is the order in which the values are evaluated. Returns nil if none are set.
This version replaces the original 'for _, val in pairs do' and a similar version that used ipairs. With the pairs
version the order of evaluation could not be guaranteed. With the ipairs version, a nil value would terminate
the for-loop before it reached the actual end of the list.
]]
local function first_set (list, count)
local i = 1;
while i <= count do -- loop through all items in list
if is_set( list[i] ) then
return list[i]; -- return the first set list member
end
i = i + 1; -- point to next
end
end
--[[--------------------------< A D D _ P R O P _ C A T >--------------------------------------------------------
Adds a category to z.properties_cats using names from the configuration file with additional text if any.
foreign_lang_source and foreign_lang_source_2 keys have a language code appended to them so that multiple languages
may be categorized but multiples of the same language are not categorized.
added_prop_cats is a table declared in page scope variables above
]]
local function add_prop_cat (key, arguments)
if not added_prop_cats [key] then
added_prop_cats [key] = true; -- note that we've added this category
key = key:gsub ('(foreign_lang_source_?2?)%a%a%a?[%a%-]*', '%1'); -- strip lang code from keyname
table.insert( z.properties_cats, substitute (cfg.prop_cats [key], arguments)); -- make name then add to table
end
end
--[[--------------------------< A D D _ V A N C _ E R R O R >----------------------------------------------------
Adds a single Vancouver system error message to the template's output regardless of how many error actually exist.
To prevent duplication, added_vanc_errs is nil until an error message is emitted.
added_vanc_errs is a boolean declared in page scope variables above
]]
local function add_vanc_error (source)
if not added_vanc_errs then
added_vanc_errs = true; -- note that we've added this category
table.insert( z.message_tail, { set_error( 'vancouver', {source}, true ) } );
end
end
--[[--------------------------< I S _ S C H E M E >------------------------------------------------------------
does this thing that purports to be a uri scheme seem to be a valid scheme? The scheme is checked to see if it
is in agreement with http://tools.ietf.org/html/std66#section-3.1 which says:
Scheme names consist of a sequence of characters beginning with a
letter and followed by any combination of letters, digits, plus
("+"), period ("."), or hyphen ("-").
returns true if it does, else false
]]
local function is_scheme (scheme)
return scheme and scheme:match ('^%a[%a%d%+%.%-]*:'); -- true if scheme is set and matches the pattern
end
--[=[-------------------------< I S _ D O M A I N _ N A M E >--------------------------------------------------
Does this thing that purports to be a domain name seem to be a valid domain name?
Syntax defined here: http://tools.ietf.org/html/rfc1034#section-3.5
BNF defined here: https://tools.ietf.org/html/rfc4234
Single character names are generally reserved; see https://tools.ietf.org/html/draft-ietf-dnsind-iana-dns-01#page-15;
see also [[Single-letter second-level domain]]
list of tlds: https://www.iana.org/domains/root/db
rfc952 (modified by rfc 1123) requires the first and last character of a hostname to be a letter or a digit. Between
the first and last characters the name may use letters, digits, and the hyphen.
Also allowed are IPv4 addresses. IPv6 not supported
domain is expected to be stripped of any path so that the last character in the last character of the tld. tld
is two or more alpha characters. Any preceding '//' (from splitting a url with a scheme) will be stripped
here. Perhaps not necessary but retained incase it is necessary for IPv4 dot decimal.
There are several tests:
the first character of the whole domain name including subdomains must be a letter or a digit
internationalized domain name (ascii characters with .xn-- ASCII Compatible Encoding (ACE) prefix xn-- in the tld) see https://tools.ietf.org/html/rfc3490
single-letter/digit second-level domains in the .org, .cash, and .today TLDs
q, x, and z SL domains in the .com TLD
i and q SL domains in the .net TLD
single-letter SL domains in the ccTLDs (where the ccTLD is two letters)
two-character SL domains in gTLDs (where the gTLD is two or more letters)
three-plus-character SL domains in gTLDs (where the gTLD is two or more letters)
IPv4 dot-decimal address format; TLD not allowed
returns true if domain appears to be a proper name and tld or IPv4 address, else false
]=]
local function is_domain_name (domain)
if not domain then
return false; -- if not set, abandon
end
domain = domain:gsub ('^//', ''); -- strip '//' from domain name if present; done here so we only have to do it once
if not domain:match ('^[%w]') then -- first character must be letter or digit
return false;
end
if domain:match ('^%a+:') then -- hack to detect things that look like s:Page:Title where Page: is namespace at wikisource
return false;
end
local patterns = { -- patterns that look like urls
'%f[%w][%w][%w%-]+[%w]%.%a%a+$', -- three or more character hostname.hostname or hostname.tld
'%f[%w][%w][%w%-]+[%w]%.xn%-%-[%w]+$', -- internationalized domain name with ACE prefix
'%f[%a][qxz]%.com$', -- assigned one character .com hostname (x.com times out 2015-12-10)
'%f[%a][iq]%.net$', -- assigned one character .net hostname (q.net registered but not active 2015-12-10)
'%f[%w][%w]%.%a%a$', -- one character hostname and cctld (2 chars)
'%f[%w][%w][%w]%.%a%a+$', -- two character hostname and tld
'^%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?', -- IPv4 address
}
for _, pattern in ipairs (patterns) do -- loop through the patterns list
if domain:match (pattern) then
return true; -- if a match then we think that this thing that purports to be a url is a url
end
end
for _, d in ipairs ({'cash', 'company', 'today', 'org'}) do -- look for single letter second level domain names for these top level domains
if domain:match ('%f[%w][%w]%.' .. d) then
return true
end
end
return false; -- no matches, we don't know what this thing is
end
--[[--------------------------< I S _ U R L >------------------------------------------------------------------
returns true if the scheme and domain parts of a url appear to be a valid url; else false.
This function is the last step in the validation process. This function is separate because there are cases that
are not covered by split_url(), for example is_parameter_ext_wikilink() which is looking for bracketted external
wikilinks.
]]
local function is_url (scheme, domain)
if is_set (scheme) then -- if scheme is set check it and domain
return is_scheme (scheme) and is_domain_name (domain);
else
return is_domain_name (domain); -- scheme not set when url is protocol relative
end
end
--[[--------------------------< S P L I T _ U R L >------------------------------------------------------------
Split a url into a scheme, authority indicator, and domain.
First remove Fully Qualified Domain Name terminator (a dot following tld) (if any) and any path(/), query(?) or fragment(#).
If protocol relative url, return nil scheme and domain else return nil for both scheme and domain.
When not protocol relative, get scheme, authority indicator, and domain. If there is an authority indicator (one
or more '/' characters immediately following the scheme's colon), make sure that there are only 2.
Strip off any port and path;
]]
local function split_url (url_str)
local scheme, authority, domain;
url_str = url_str:gsub ('([%a%d])%.?[/%?#].*$', '%1'); -- strip FQDN terminator and path(/), query(?), fragment (#) (the capture prevents false replacement of '//')
if url_str:match ('^//%S*') then -- if there is what appears to be a protocol relative url
domain = url_str:match ('^//(%S*)')
elseif url_str:match ('%S-:/*%S+') then -- if there is what appears to be a scheme, optional authority indicator, and domain name
scheme, authority, domain = url_str:match ('(%S-:)(/*)(%S+)'); -- extract the scheme, authority indicator, and domain portions
authority = authority:gsub ('//', '', 1); -- replace place 1 pair of '/' with nothing;
if is_set(authority) then -- if anything left (1 or 3+ '/' where authority should be) then
return scheme; -- return scheme only making domain nil which will cause an error message
end
domain = domain:gsub ('(%a):%d+', '%1'); -- strip port number if present
end
return scheme, domain;
end
--[[--------------------------< L I N K _ P A R A M _ O K >---------------------------------------------------
checks the content of |title-link=, |series-link=, |author-link= etc for properly formatted content: no wikilinks, no urls
Link parameters are to hold the title of a wikipedia article so none of the WP:TITLESPECIALCHARACTERS are allowed:
# < > [ ] | { } _
except the underscore which is used as a space in wiki urls and # which is used for section links
returns false when the value contains any of these characters.
When there are no illegal characters, this function returns TRUE if value DOES NOT appear to be a valid url (the
|<param>-link= parameter is ok); else false when value appears to be a valid url (the |<param>-link= parameter is NOT ok).
]]
local function link_param_ok (value)
local scheme, domain;
if value:find ('[<>%[%]|{}]') then -- if any prohibited characters
return false;
end
scheme, domain = split_url (value); -- get scheme or nil and domain or nil from url;
return not is_url (scheme, domain); -- return true if value DOES NOT appear to be a valid url
end
--[[--------------------------< L I N K _ T I T L E _ O K >---------------------------------------------------
Use link_param_ok() to validate |<param>-link= value and its matching |<title>= value.
|<title>= may be wikilinked but not when |<param>-link= has a value. This function emits an error message when
that condition exists
]]
local function link_title_ok (link, lorig, title, torig)
local orig;
if is_set (link) then -- don't bother if <param>-link doesn't have a value
if not link_param_ok (link) then -- check |<param>-link= markup
orig = lorig; -- identify the failing link parameter
elseif title:find ('%[%[') then -- check |title= for wikilink markup
orig = torig; -- identify the failing |title= parameter
end
end
if is_set (orig) then
table.insert( z.message_tail, { set_error( 'bad_paramlink', orig)}); -- url or wikilink in |title= with |title-link=;
end
end
--[[--------------------------< C H E C K _ U R L >------------------------------------------------------------
Determines whether a URL string appears to be valid.
First we test for space characters. If any are found, return false. Then split the url into scheme and domain
portions, or for protocol relative (//example.com) urls, just the domain. Use is_url() to validate the two
portions of the url. If both are valid, or for protocol relative if domain is valid, return true, else false.
Because it is different from a standard url, and because this module used external_link() to make external links
that work for standard and news: links, we validate newsgroup names here. The specification for a newsgroup name
is at https://tools.ietf.org/html/rfc5536#section-3.1.4
]]
local function check_url( url_str )
if nil == url_str:match ("^%S+$") then -- if there are any spaces in |url=value it can't be a proper url
return false;
end
local scheme, domain;
scheme, domain = split_url (url_str); -- get scheme or nil and domain or nil from url;
if 'news:' == scheme then -- special case for newsgroups
return domain:match('^[%a%d%+%-_]+%.[%a%d%+%-_%.]*[%a%d%+%-_]$');
end
return is_url (scheme, domain); -- return true if value appears to be a valid url
end
--[=[-------------------------< I S _ P A R A M E T E R _ E X T _ W I K I L I N K >----------------------------
Return true if a parameter value has a string that begins and ends with square brackets [ and ] and the first
non-space characters following the opening bracket appear to be a url. The test will also find external wikilinks
that use protocol relative urls. Also finds bare urls.
The frontier pattern prevents a match on interwiki links which are similar to scheme:path urls. The tests that
find bracketed urls are required because the parameters that call this test (currently |title=, |chapter=, |work=,
and |publisher=) may have wikilinks and there are articles or redirects like '//Hus' so, while uncommon, |title=[[//Hus]]
is possible as might be [[en://Hus]].
]=]
local function is_parameter_ext_wikilink (value)
local scheme, domain;
if value:match ('%f[%[]%[%a%S*:%S+.*%]') then -- if ext wikilink with scheme and domain: [xxxx://yyyyy.zzz]
scheme, domain = split_url (value:match ('%f[%[]%[(%a%S*:%S+).*%]'));
elseif value:match ('%f[%[]%[//%S+.*%]') then -- if protocol relative ext wikilink: [//yyyyy.zzz]
scheme, domain = split_url (value:match ('%f[%[]%[(//%S+).*%]'));
elseif value:match ('%a%S*:%S+') then -- if bare url with scheme; may have leading or trailing plain text
scheme, domain = split_url (value:match ('(%a%S*:%S+)'));
elseif value:match ('//%S+') then -- if protocol relative bare url: //yyyyy.zzz; may have leading or trailing plain text
scheme, domain = split_url (value:match ('(//%S+)')); -- what is left should be the domain
else
return false; -- didn't find anything that is obviously a url
end
return is_url (scheme, domain); -- return true if value appears to be a valid url
end
--[[-------------------------< C H E C K _ F O R _ U R L >-----------------------------------------------------
loop through a list of parameters and their values. Look at the value and if it has an external link, emit an error message.
]]
local function check_for_url (parameter_list)
local error_message = '';
for k, v in pairs (parameter_list) do -- for each parameter in the list
if is_parameter_ext_wikilink (v) then -- look at the value; if there is a url add an error message
if is_set(error_message) then -- once we've added the first portion of the error message ...
error_message=error_message .. ", "; -- ... add a comma space separator
end
error_message=error_message .. "|" .. k .. "="; -- add the failed parameter
end
end
if is_set (error_message) then -- done looping, if there is an error message, display it
table.insert( z.message_tail, { set_error( 'param_has_ext_link', {error_message}, true ) } );
end
end
--[[--------------------------< S A F E _ F O R _ U R L >------------------------------------------------------
Escape sequences for content that will be used for URL descriptions
]]
local function safe_for_url( str )
if str:match( "%[%[.-%]%]" ) ~= nil then
table.insert( z.message_tail, { set_error( 'wikilink_in_url', {}, true ) } );
end
return str:gsub( '[%[%]\n]', {
['['] = '[',
[']'] = ']',
['\n'] = ' ' } );
end
--[[--------------------------< E X T E R N A L _ L I N K >----------------------------------------------------
Format an external link with error checking
]]
local function external_link( URL, label, source, access)
local error_str = "";
local domain;
local path;
local base_url;
if not is_set( label ) then
label = URL;
if is_set( source ) then
error_str = set_error( 'bare_url_missing_title', { wrap_style ('parameter', source) }, false, " " );
else
error( cfg.messages["bare_url_no_origin"] );
end
end
if not check_url( URL ) then
error_str = set_error( 'bad_url', {wrap_style ('parameter', source)}, false, " " ) .. error_str;
end
domain, path = URL:match ('^([/%.%-%+:%a%d]+)([/%?#].*)$'); -- split the url into scheme plus domain and path
if path then -- if there is a path portion
path = path:gsub ('[%[%]]', {['[']='%5b',[']']='%5d'}); -- replace '[' and ']' with their percent encoded values
URL = table.concat ({domain, path}); -- and reassemble
end
base_url = table.concat({ "[", URL, " ", safe_for_url (label), "]" }); -- assemble a wikimarkup url
if is_set (access) then -- access level (subscription, registration, limited)
base_url = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[access].class, cfg.presentation[access].title, base_url}); -- add the appropriate icon
end
return table.concat ({base_url, error_str});
end
--[[--------------------------< D E P R E C A T E D _ P A R A M E T E R >--------------------------------------
Categorize and emit an error message when the citation contains one or more deprecated parameters. The function includes the
offending parameter name to the error message. Only one error message is emitted regardless of the number of deprecated
parameters in the citation.
added_deprecated_cat is a boolean declared in page scope variables above
]]
local function deprecated_parameter(name)
if not added_deprecated_cat then
added_deprecated_cat = true; -- note that we've added this category
table.insert( z.message_tail, { set_error( 'deprecated_params', {name}, true ) } ); -- add error message
end
end
--[=[-------------------------< K E R N _ Q U O T E S >--------------------------------------------------------
Apply kerning to open the space between the quote mark provided by the Module and a leading or trailing quote
mark contained in a |title= or |chapter= parameter's value.
This function will positive kern either single or double quotes:
"'Unkerned title with leading and trailing single quote marks'"
" 'Kerned title with leading and trailing single quote marks' " (in real life the kerning isn't as wide as this example)
Double single quotes (italic or bold wikimarkup) are not kerned.
Replaces unicode quotemarks in plain text or in the label portion of a [[L|D]] style wikilink with typewriter
quote marks regardless of the need for kerning. Unicode quote marks are not replaced in simple [[D]] wikilinks.
Call this function for chapter titles, for website titles, etc; not for book titles.
]=]
local function kern_quotes (str)
local cap='';
local cap2='';
local wl_type, label, link;
wl_type, label, link = is_wikilink (str); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]]
if 1 == wl_type then -- [[D]] simple wikilink with or without quote marks
if mw.ustring.match (str, '%[%[[\"“”\'‘’].+[\"“”\'‘’]%]%]') then -- leading and trailing quote marks
str = substitute (cfg.presentation['kern-wl-both'], str);
elseif mw.ustring.match (str, '%[%[[\"“”\'‘’].+%]%]') then -- leading quote marks
str = substitute (cfg.presentation['kern-wl-left'], str);
elseif mw.ustring.match (str, '%[%[.+[\"“”\'‘’]%]%]') then -- trailing quote marks
str = substitute (cfg.presentation['kern-wl-right'], str);
end
else -- plain text or [[L|D]]; text in label variable
label= mw.ustring.gsub (label, '[“”]', '\"'); -- replace “” (U+201C & U+201D) with " (typewriter double quote mark)
label= mw.ustring.gsub (label, '[‘’]', '\''); -- replace ‘’ (U+2018 & U+2019) with ' (typewriter single quote mark)
cap, cap2 = mw.ustring.match (label, "^([\"\'])([^\'].+)"); -- match leading double or single quote but not doubled single quotes (italic markup)
if is_set (cap) then
label = substitute (cfg.presentation['kern-left'], {cap, cap2});
end
cap, cap2 = mw.ustring.match (label, "^(.+[^\'])([\"\'])$") -- match trailing double or single quote but not doubled single quotes (italic markup)
if is_set (cap) then
label = substitute (cfg.presentation['kern-right'], {cap, cap2});
end
if 2 == wl_type then
str = make_wikilink (link, label); -- reassemble the wikilink
else
str = label;
end
end
return str;
end
--[[--------------------------< F O R M A T _ S C R I P T _ V A L U E >----------------------------------------
|script-title= holds title parameters that are not written in Latin based scripts: Chinese, Japanese, Arabic, Hebrew, etc. These scripts should
not be italicized and may be written right-to-left. The value supplied by |script-title= is concatenated onto Title after Title has been wrapped
in italic markup.
Regardless of language, all values provided by |script-title= are wrapped in <bdi>...</bdi> tags to isolate rtl languages from the English left to right.
|script-title= provides a unique feature. The value in |script-title= may be prefixed with a two-character ISO639-1 language code and a colon:
|script-title=ja:*** *** (where * represents a Japanese character)
Spaces between the two-character code and the colon and the colon and the first script character are allowed:
|script-title=ja : *** ***
|script-title=ja: *** ***
|script-title=ja :*** ***
Spaces preceding the prefix are allowed: |script-title = ja:*** ***
The prefix is checked for validity. If it is a valid ISO639-1 language code, the lang attribute (lang="ja") is added to the <bdi> tag so that browsers can
know the language the tag contains. This may help the browser render the script more correctly. If the prefix is invalid, the lang attribute
is not added. At this time there is no error message for this condition.
Supports |script-title=, |script-chapter=, |script-<periodical>=
]]
local function format_script_value (script_value, script_param)
local lang=''; -- initialize to empty string
local name;
-- if script_value:match('^%l%l%s*:') then -- if first 3 non-space characters are script language prefix
if script_value:match('^%l%l%l?%s*:') then -- if first 3 or 4 non-space characters are script language prefix
-- lang = script_value:match('^(%l%l)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script
lang = script_value:match('^(%l%l%l?)%s*:%s*%S.*'); -- get the language prefix or nil if there is no script
if not is_set (lang) then
table.insert( z.message_tail, { set_error( 'script_parameter', {script_param, 'missing title part'}, true ) } ); -- prefix without 'title'; add error message
return ''; -- script_value was just the prefix so return empty string
end
-- if we get this far we have prefix and script
name = cfg.lang_code_remap[lang] or mw.language.fetchLanguageName( lang, cfg.this_wiki_code ); -- get language name so that we can use it to categorize
if is_set (name) then -- is prefix a proper ISO 639-1 language code?
-- script_value = script_value:gsub ('^%l%l%s*:%s*', ''); -- strip prefix from script
script_value = script_value:gsub ('^%l+%s*:%s*', ''); -- strip prefix from script
-- is prefix one of these language codes?
if in_array (lang, cfg.script_lang_codes) then
add_prop_cat ('script_with_name', {name, lang})
else
table.insert( z.message_tail, { set_error( 'script_parameter', {script_param, 'unknown language code'}, true ) } ); -- unknown script-language; add error message
end
lang = ' lang="' .. lang .. '" '; -- convert prefix into a lang attribute
else
table.insert( z.message_tail, { set_error( 'script_parameter', {script_param, 'invalid language code'}, true ) } ); -- invalid language code; add error message
lang = ''; -- invalid so set lang to empty string
end
else
table.insert( z.message_tail, { set_error( 'script_parameter', {script_param, 'missing prefix'}, true ) } ); -- no language code prefix; add error message
end
script_value = substitute (cfg.presentation['bdi'], {lang, script_value}); -- isolate in case script is rtl
return script_value;
end
--[[--------------------------< S C R I P T _ C O N C A T E N A T E >------------------------------------------
Initially for |title= and |script-title=, this function concatenates those two parameter values after the script value has been
wrapped in <bdi> tags.
]]
local function script_concatenate (title, script, script_param)
if is_set (script) then
script = format_script_value (script, script_param); -- <bdi> tags, lang atribute, categorization, etc; returns empty string on error
if is_set (script) then
title = title .. ' ' .. script; -- concatenate title and script title
end
end
return title;
end
--[[--------------------------< W R A P _ M S G >--------------------------------------------------------------
Applies additional message text to various parameter values. Supplied string is wrapped using a message_list
configuration taking one argument. Supports lower case text for {{citation}} templates. Additional text taken
from citation_config.messages - the reason this function is similar to but separate from wrap_style().
]]
local function wrap_msg (key, str, lower)
if not is_set( str ) then
return "";
end
if true == lower then
local msg;
msg = cfg.messages[key]:lower(); -- set the message to lower case before
return substitute( msg, str ); -- including template text
else
return substitute( cfg.messages[key], str );
end
end
--[[--------------------------< W I K I S O U R C E _ U R L _ M A K E >----------------------------------------
makes a wikisource url from wikisource interwiki link. returns the url and appropriate label; nil else.
str is the value assigned to |chapter= (or aliases) or |title= or |title-link=
]]
local function wikisource_url_make (str)
local wl_type, D, L;
local ws_url, ws_label;
wl_type, D, L = is_wikilink (str); -- wl_type is 0 (not a wikilink), 1 (simple wikilink), 2 (complex wikilink)
if 0 == wl_type then -- not a wikilink; might be from |title-link=
str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace
if is_set (str) then
ws_url = table.concat ({ -- build a wikisource url
'https://en.wikisource.org/wiki/', -- prefix
str, -- article title
});
ws_label = str; -- label for the url
end
elseif 1 == wl_type then -- simple wikilink: [[Wikisource:ws article]]
str = D:match ('^[Ww]ikisource:(.+)') or D:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace
if is_set (str) then
ws_url = table.concat ({ -- build a wikisource url
'https://en.wikisource.org/wiki/', -- prefix
str, -- article title
});
ws_label = str; -- label for the url
end
elseif 2 == wl_type then -- non-so-simple wikilink: [[Wikisource:ws article|displayed text]] ([[L|D]])
str = L:match ('^[Ww]ikisource:(.+)') or L:match ('^[Ss]:(.+)'); -- article title from interwiki link with long-form or short-form namespace
if is_set (str) then
ws_label = D; -- get ws article name from display portion of interwiki link
ws_url = table.concat ({ -- build a wikisource url
'https://en.wikisource.org/wiki/', -- prefix
str, -- article title without namespace from link portion of wikilink
});
end
end
if ws_url then
ws_url = mw.uri.encode (ws_url, 'WIKI'); -- make a usable url
ws_url = ws_url:gsub ('%%23', '#'); -- undo percent encoding of anchor
end
return ws_url, ws_label, L or D; -- return proper url or nil and a label or nil
end
--[[--------------------------< F O R M A T _ P E R I O D I C A L >--------------------------------------------
Format the four periodical parameters: |script-<periodical>=, |<periodical>=, and |trans-<periodical>= into a single Periodical meta-
parameter.
]]
local function format_periodical (script_periodical, script_periodical_source, periodical, trans_periodical)
local periodical_error = '';
if not is_set (periodical) then
periodical = ''; -- to be safe for concatenation
else
periodical = wrap_style ('italic-title', periodical); -- style
end
periodical = script_concatenate (periodical, script_periodical, script_periodical_source); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped
if is_set (trans_periodical) then
trans_periodical = wrap_style ('trans-italic-title', trans_periodical);
if is_set (periodical) then
periodical = periodical .. ' ' .. trans_periodical;
else -- here when transchapter without chapter or script-chapter
periodical = trans_periodical;
periodical_error = ' ' .. set_error ('trans_missing_title', {'periodical'});
end
end
return periodical .. periodical_error;
end
--[[--------------------------< F O R M A T _ C H A P T E R _ T I T L E >--------------------------------------
Format the four chapter parameters: |script-chapter=, |chapter=, |trans-chapter=, and |chapter-url= into a single Chapter meta-
parameter (chapter_url_source used for error messages).
]]
local function format_chapter_title (scriptchapter, script_chapter_source, chapter, transchapter, chapterurl, chapter_url_source, no_quotes, access)
local chapter_error = '';
local ws_url, ws_label, L = wikisource_url_make (chapter); -- make a wikisource url and label from a wikisource interwiki link
if ws_url then
ws_label = ws_label:gsub ('_', ''); -- replace underscore separaters with space characters
chapter = ws_label;
end
if not is_set (chapter) then
chapter = ''; -- to be safe for concatenation
else
if false == no_quotes then
chapter = kern_quotes (chapter); -- if necessary, separate chapter title's leading and trailing quote marks from Module provided quote marks
chapter = wrap_style ('quoted-title', chapter);
end
end
chapter = script_concatenate (chapter, scriptchapter, script_chapter_source); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped
if is_set (chapterurl) then
chapter = external_link (chapterurl, chapter, chapter_url_source, access); -- adds bare_url_missing_title error if appropriate
elseif ws_url then
chapter = external_link (ws_url, chapter .. ' ', 'ws link in chapter'); -- adds bare_url_missing_title error if appropriate; space char to move icon away from chap text; TODO: better way to do this?
chapter = substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, chapter});
end
if is_set (transchapter) then
transchapter = wrap_style ('trans-quoted-title', transchapter);
if is_set (chapter) then
chapter = chapter .. ' ' .. transchapter;
else -- here when transchapter without chapter or script-chapter
chapter = transchapter;
chapter_error = ' ' .. set_error ('trans_missing_title', {'chapter'});
end
end
-- if is_set (chapterurl) then
-- chapter = external_link (chapterurl, chapter, chapter_url_source, access); -- adds bare_url_missing_title error if appropriate
-- end
return chapter .. chapter_error;
end
--[[--------------------------< H A S _ I N V I S I B L E _ C H A R S >----------------------------------------
This function searches a parameter's value for nonprintable or invisible characters. The search stops at the
first match.
This function will detect the visible replacement character when it is part of the wikisource.
Detects but ignores nowiki and math stripmarkers. Also detects other named stripmarkers (gallery, math, pre, ref)
and identifies them with a slightly different error message. See also coins_cleanup().
Output of this function is an error message that identifies the character or the Unicode group, or the stripmarker
that was detected along with its position (or, for multi-byte characters, the position of its first byte) in the
parameter value.
]]
local function has_invisible_chars (param, v)
local position = ''; -- position of invisible char or starting position of stripmarker
local dummy; -- end of matching string; not used but required to hold end position when a capture is returned
local capture; -- used by stripmarker detection to hold name of the stripmarker
local i=1;
local stripmarker, apostrophe;
capture = string.match (v, '[%w%p ]*'); -- Test for values that are simple ASCII text and bypass other tests if true
if capture == v then -- if same there are no unicode characters
return;
end
while cfg.invisible_chars[i] do
local char=cfg.invisible_chars[i][1] -- the character or group name
local pattern=cfg.invisible_chars[i][2] -- the pattern used to find it
position, dummy, capture = mw.ustring.find (v, pattern) -- see if the parameter value contains characters that match the pattern
if position and (char == 'zero width joiner') then -- if we found a zero width joiner character
if mw.ustring.find (v, cfg.indic_script) then -- its ok if one of the indic scripts
position = nil; -- unset position
end
end
if position then
if 'nowiki' == capture or 'math' == capture or -- nowiki and math stripmarkers (not an error condition)
('templatestyles' == capture and in_array (param, {'id', 'quote'})) then -- templatestyles stripmarker allowed in these parameters
stripmarker = true; -- set a flag
elseif true == stripmarker and 'delete' == char then -- because stripmakers begin and end with the delete char, assume that we've found one end of a stripmarker
position = nil; -- unset
else
local err_msg;
if capture then
err_msg = capture .. ' ' .. char;
else
err_msg = char .. ' ' .. 'character';
end
table.insert( z.message_tail, { set_error( 'invisible_char', {err_msg, wrap_style ('parameter', param), position}, true ) } ); -- add error message
return; -- and done with this parameter
end
end
i=i+1; -- bump our index
end
end
--[[--------------------------< A R G U M E N T _ W R A P P E R >----------------------------------------------
Argument wrapper. This function provides support for argument mapping defined in the configuration file so that
multiple names can be transparently aliased to single internal variable.
]]
local function argument_wrapper( args )
local origin = {};
return setmetatable({
ORIGIN = function( self, k )
local dummy = self[k]; --force the variable to be loaded.
return origin[k];
end
},
{
__index = function ( tbl, k )
if origin[k] ~= nil then
return nil;
end
local args, list, v = args, cfg.aliases[k];
if type( list ) == 'table' then
v, origin[k] = select_one( args, list, 'redundant_parameters' );
if origin[k] == nil then
origin[k] = ''; -- Empty string, not nil
end
elseif list ~= nil then
v, origin[k] = args[list], list;
else
-- maybe let through instead of raising an error?
-- v, origin[k] = args[k], k;
error( cfg.messages['unknown_argument_map'] .. ': ' .. k);
end
-- Empty strings, not nil;
if v == nil then
v = cfg.defaults[k] or '';
origin[k] = '';
end
tbl = rawset( tbl, k, v );
return v;
end,
});
end
--[[--------------------------< N O W R A P _ D A T E >--------------------------------------------------------
When date is YYYY-MM-DD format wrap in nowrap span: <span ...>YYYY-MM-DD</span>. When date is DD MMMM YYYY or is
MMMM DD, YYYY then wrap in nowrap span: <span ...>DD MMMM</span> YYYY or <span ...>MMMM DD,</span> YYYY
DOES NOT yet support MMMM YYYY or any of the date ranges.
]]
local function nowrap_date (date)
local cap='';
local cap2='';
if date:match("^%d%d%d%d%-%d%d%-%d%d$") then
date = substitute (cfg.presentation['nowrap1'], date);
elseif date:match("^%a+%s*%d%d?,%s+%d%d%d%d$") or date:match ("^%d%d?%s*%a+%s+%d%d%d%d$") then
cap, cap2 = string.match (date, "^(.*)%s+(%d%d%d%d)$");
date = substitute (cfg.presentation['nowrap2'], {cap, cap2});
end
return date;
end
--[[--------------------------< S E T _ T I T L E T Y P E >----------------------------------------------------
This function sets default title types (equivalent to the citation including |type=<default value>) for those templates that have defaults.
Also handles the special case where it is desirable to omit the title type from the rendered citation (|type=none).
]]
local function set_titletype (cite_class, title_type)
if is_set(title_type) then
if "none" == title_type then
title_type = ""; -- if |type=none then type parameter not displayed
end
return title_type; -- if |type= has been set to any other value use that value
end
return cfg.title_types [cite_class] or ''; -- set template's default title type; else empty string for concatenation
end
--[[--------------------------< H Y P H E N _ T O _ D A S H >--------------------------------------------------
Converts a hyphen to a dash under certain conditions. The hyphen must separate like items; unlike items are
returned unmodified. These forms are modified:
letter - letter (A - B)
digit - digit (4-5)
digit separator digit - digit separator digit (4.1-4.5 or 4-1-4-5)
letterdigit - letterdigit (A1-A5) (an optional separator between letter and digit is supported – a.1-a.5 or a-1-a-5)
digitletter - digitletter (5a - 5d) (an optional separator between letter and digit is supported – 5.a-5.d or 5-a-5-d)
any other forms are returned unmodified.
str may be a comma- or semicolon-separated list
]]
local function hyphen_to_dash( str )
if not is_set (str) then
return str;
end
str, count = str:gsub ('^%(%((.+)%)%)$', '%1'); -- remove accept-this-as-written markup when it wraps all of str
if 0 ~= count then -- non-zero when markup removed; zero else
return str; -- nothing to do, we're done
end
str = str:gsub ('&[nm]dash;', {['–'] = '–', ['—'] = '—'}); -- replace — and – entities with their characters; semicolon mucks up the text.split
str = str:gsub ('-', '-'); -- replace html numeric entity with hyphen character
local out = {};
local list = mw.text.split (str, '%s*[,;]%s*'); -- split str at comma or semicolon separators if there are any
for _, item in ipairs (list) do -- for each item in the list
if mw.ustring.match (item, '^%w*[%.%-]?%w+%s*[%-–—]%s*%w*[%.%-]?%w+$') then -- if a hyphenated range or has endash or emdash separators
if item:match ('^%a+[%.%-]?%d+%s*%-%s*%a+[%.%-]?%d+$') or -- letterdigit hyphen letterdigit (optional separator between letter and digit)
item:match ('^%d+[%.%-]?%a+%s*%-%s*%d+[%.%-]?%a+$') or -- digitletter hyphen digitletter (optional separator between digit and letter)
item:match ('^%d+[%.%-]%d+%s*%-%s*%d+[%.%-]%d+$') or -- digit separator digit hyphen digit separator digit
item:match ('^%d+%s*%-%s*%d+$') or -- digit hyphen digit
item:match ('^%a+%s*%-%s*%a+$') then -- letter hyphen letter
item = item:gsub ('(%w*[%.%-]?%w+)%s*%-%s*(%w*[%.%-]?%w+)', '%1–%2'); -- replace hyphen, remove extraneous space characters
else
item = mw.ustring.gsub (item, '%s*[–—]%s*', '–'); -- for endash or emdash separated ranges, replace em with en, remove extraneous white space
end
end
item = item:gsub ('^%(%((.+)%)%)$', '%1'); -- remove the accept-this-as-written markup
table.insert (out, item); -- add the (possibly modified) item to the output table
end
return table.concat (out, ', '); -- concatenate the output table into a comma separated string
end
--[[--------------------------< S A F E _ J O I N >------------------------------------------------------------
Joins a sequence of strings together while checking for duplicate separation characters.
]]
local function safe_join( tbl, duplicate_char )
local f = {}; -- create a function table appropriate to type of 'dupicate character'
if 1 == #duplicate_char then -- for single byte ascii characters use the string library functions
f.gsub=string.gsub
f.match=string.match
f.sub=string.sub
else -- for multi-byte characters use the ustring library functions
f.gsub=mw.ustring.gsub
f.match=mw.ustring.match
f.sub=mw.ustring.sub
end
local str = ''; -- the output string
local comp = ''; -- what does 'comp' mean?
local end_chr = '';
local trim;
for _, value in ipairs( tbl ) do
if value == nil then value = ''; end
if str == '' then -- if output string is empty
str = value; -- assign value to it (first time through the loop)
elseif value ~= '' then
if value:sub(1,1) == '<' then -- Special case of values enclosed in spans and other markup.
comp = value:gsub( "%b<>", "" ); -- remove html markup (<span>string</span> -> string)
else
comp = value;
end
-- typically duplicate_char is sepc
if f.sub(comp, 1,1) == duplicate_char then -- is first character same as duplicate_char? why test first character?
-- Because individual string segments often (always?) begin with terminal punct for the
-- preceding segment: 'First element' .. 'sepc next element' .. etc?
trim = false;
end_chr = f.sub(str, -1,-1); -- get the last character of the output string
-- str = str .. "<HERE(enchr=" .. end_chr.. ")" -- debug stuff?
if end_chr == duplicate_char then -- if same as separator
str = f.sub(str, 1,-2); -- remove it
elseif end_chr == "'" then -- if it might be wikimarkup
if f.sub(str, -3,-1) == duplicate_char .. "''" then -- if last three chars of str are sepc''
str = f.sub(str, 1, -4) .. "''"; -- remove them and add back ''
elseif f.sub(str, -5,-1) == duplicate_char .. "]]''" then -- if last five chars of str are sepc]]''
trim = true; -- why? why do this and next differently from previous?
elseif f.sub(str, -4,-1) == duplicate_char .. "]''" then -- if last four chars of str are sepc]''
trim = true; -- same question
end
elseif end_chr == "]" then -- if it might be wikimarkup
if f.sub(str, -3,-1) == duplicate_char .. "]]" then -- if last three chars of str are sepc]] wikilink
trim = true;
elseif f.sub(str, -3,-1) == duplicate_char .. '"]' then -- if last three chars of str are sepc"] quoted external link
trim = true;
elseif f.sub(str, -2,-1) == duplicate_char .. "]" then -- if last two chars of str are sepc] external link
trim = true;
elseif f.sub(str, -4,-1) == duplicate_char .. "'']" then -- normal case when |url=something & |title=Title.
trim = true;
end
elseif end_chr == " " then -- if last char of output string is a space
if f.sub(str, -2,-1) == duplicate_char .. " " then -- if last two chars of str are <sepc><space>
str = f.sub(str, 1,-3); -- remove them both
end
end
if trim then
if value ~= comp then -- value does not equal comp when value contains html markup
local dup2 = duplicate_char;
if f.match(dup2, "%A" ) then dup2 = "%" .. dup2; end -- if duplicate_char not a letter then escape it
value = f.gsub(value, "(%b<>)" .. dup2, "%1", 1 ) -- remove duplicate_char if it follows html markup
else
value = f.sub(value, 2, -1 ); -- remove duplicate_char when it is first character
end
end
end
str = str .. value; --add it to the output string
end
end
return str;
end
--[[--------------------------< I S _ S U F F I X >------------------------------------------------------------
returns true is suffix is properly formed Jr, Sr, or ordinal in the range 2–9. Puncutation not allowed.
]]
local function is_suffix (suffix)
if in_array (suffix, {'Jr', 'Sr', '2nd', '3rd'}) or suffix:match ('^%dth$') then
return true;
end
return false;
end
--[[--------------------------< I S _ G O O D _ V A N C _ N A M E >--------------------------------------------
For Vancouver Style, author/editor names are supposed to be rendered in Latin (read ASCII) characters. When a name
uses characters that contain diacritical marks, those characters are to converted to the corresponding Latin character.
When a name is written using a non-Latin alphabet or logogram, that name is to be transliterated into Latin characters.
These things are not currently possible in this module so are left to the editor to do.
This test allows |first= and |last= names to contain any of the letters defined in the four Unicode Latin character sets
[http://www.unicode.org/charts/PDF/U0000.pdf C0 Controls and Basic Latin] 0041–005A, 0061–007A
[http://www.unicode.org/charts/PDF/U0080.pdf C1 Controls and Latin-1 Supplement] 00C0–00D6, 00D8–00F6, 00F8–00FF
[http://www.unicode.org/charts/PDF/U0100.pdf Latin Extended-A] 0100–017F
[http://www.unicode.org/charts/PDF/U0180.pdf Latin Extended-B] 0180–01BF, 01C4–024F
|lastn= also allowed to contain hyphens, spaces, and apostrophes. (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/)
|firstn= also allowed to contain hyphens, spaces, apostrophes, and periods
This original test:
if nil == mw.ustring.find (last, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%']*$") or nil == mw.ustring.find (first, "^[A-Za-zÀ-ÖØ-öø-ƿDŽ-ɏ%-%s%'%.]+[2-6%a]*$") then
was written ouside of the code editor and pasted here because the code editor gets confused between character insertion point and cursor position.
The test has been rewritten to use decimal character escape sequence for the individual bytes of the unicode characters so that it is not necessary
to use an external editor to maintain this code.
\195\128-\195\150 – À-Ö (U+00C0–U+00D6 – C0 controls)
\195\152-\195\182 – Ø-ö (U+00D8-U+00F6 – C0 controls)
\195\184-\198\191 – ø-ƿ (U+00F8-U+01BF – C0 controls, Latin extended A & B)
\199\132-\201\143 – DŽ-ɏ (U+01C4-U+024F – Latin extended B)
]]
local function is_good_vanc_name (last, first)
local first, suffix = first:match ('(.-),?%s*([%dJS][%drndth]+)%.?$') or first; -- if first has something that looks like a generational suffix, get it
if is_set (suffix) then
if not is_suffix (suffix) then
add_vanc_error ('suffix');
return false; -- not a name with an appropriate suffix
end
end
if nil == mw.ustring.find (last, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%']*$") or
nil == mw.ustring.find (first, "^[A-Za-z\195\128-\195\150\195\152-\195\182\195\184-\198\191\199\132-\201\143%-%s%'%.]*$") then
add_vanc_error ('non-Latin character');
return false; -- not a string of latin characters; Vancouver requires Romanization
end;
return true;
end
--[[--------------------------< R E D U C E _ T O _ I N I T I A L S >------------------------------------------
Attempts to convert names to initials in support of |name-list-format=vanc.
Names in |firstn= may be separated by spaces or hyphens, or for initials, a period. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35062/.
Vancouver style requires family rank designations (Jr, II, III, etc) to be rendered as Jr, 2nd, 3rd, etc. See http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35085/.
This code only accepts and understands generational suffix in the Vancouver format because Roman numerals look like, and can be mistaken for, initials.
This function uses ustring functions because firstname initials may be any of the unicode Latin characters accepted by is_good_vanc_name ().
]]
local function reduce_to_initials(first)
local name, suffix = mw.ustring.match(first, "^(%u+) ([%dJS][%drndth]+)$");
if not name then -- if not initials and a suffix
name = mw.ustring.match(first, "^(%u+)$"); -- is it just intials?
end
if name then -- if first is initials with or without suffix
if 3 > mw.ustring.len (name) then -- if one or two initials
if suffix then -- if there is a suffix
if is_suffix (suffix) then -- is it legitimate?
return first; -- one or two initials and a valid suffix so nothing to do
else
add_vanc_error ('suffix'); -- one or two initials with invalid suffix so error message
return first; -- and return first unmolested
end
else
return first; -- one or two initials without suffix; nothing to do
end
end
end -- if here then name has 3 or more uppercase letters so treat them as a word
local initials, names = {}, {}; -- tables to hold name parts and initials
local i = 1; -- counter for number of initials
names = mw.text.split (first, '[%s,]+'); -- split into a table of names and possible suffix
while names[i] do -- loop through the table
if 1 < i and names[i]:match ('[%dJS][%drndth]+%.?$') then -- if not the first name, and looks like a suffix (may have trailing dot)
names[i] = names[i]:gsub ('%.', ''); -- remove terminal dot if present
if is_suffix (names[i]) then -- if a legitimate suffix
table.insert (initials, ' ' .. names[i]); -- add a separator space, insert at end of initials table
break; -- and done because suffix must fall at the end of a name
end -- no error message if not a suffix; possibly because of Romanization
end
if 3 > i then
table.insert (initials, mw.ustring.sub(names[i],1,1)); -- insert the intial at end of initials table
end
i = i+1; -- bump the counter
end
return table.concat(initials) -- Vancouver format does not include spaces.
end
--[[--------------------------< L I S T _ P E O P L E >-------------------------------------------------------
Formats a list of people (e.g. authors / editors)
]]
local function list_people(control, people, etal)
local sep;
local namesep;
local format = control.format
local maximum = control.maximum
local lastauthoramp = control.lastauthoramp;
local text = {}
if 'vanc' == format then -- Vancouver-like author/editor name styling?
sep = cfg.presentation['sep_nl_vanc']; -- name-list separator between authors is a comma
namesep = cfg.presentation['sep_name_vanc']; -- last/first separator is a space
lastauthoramp = nil; -- unset because isn't used by Vancouver style
else
sep = cfg.presentation['sep_nl']; -- name-list separator between authors is a semicolon
namesep = cfg.presentation['sep_name']; -- last/first separator is <comma><space>
end
if sep:sub(-1,-1) ~= " " then sep = sep .. " " end
if is_set (maximum) and maximum < 1 then return "", 0; end -- returned 0 is for EditorCount; not used for authors
for i,person in ipairs(people) do
if is_set(person.last) then
local mask = person.mask
local one
local sep_one = sep;
if is_set (maximum) and i > maximum then
etal = true;
break;
elseif (mask ~= nil) then
local n = tonumber(mask)
if (n ~= nil) then
one = string.rep("—",n)
else
one = mask;
sep_one = " ";
end
else
one = person.last
local first = person.first
if is_set(first) then
if ( "vanc" == format ) then -- if vancouver format
one = one:gsub ('%.', ''); -- remove periods from surnames (http://www.ncbi.nlm.nih.gov/books/NBK7271/box/A35029/)
if not person.corporate and is_good_vanc_name (one, first) then -- and name is all Latin characters; corporate authors not tested
first = reduce_to_initials(first) -- attempt to convert first name(s) to initials
end
end
one = one .. namesep .. first;
end
if is_set(person.link) and person.link ~= control.page_name then
one = make_wikilink (person.link, one); -- link author/editor if this page is not the author's/editor's page
end
end
table.insert( text, one )
table.insert( text, sep_one )
end
end
local count = #text / 2; -- (number of names + number of separators) divided by 2
if count > 0 then
if count > 1 and is_set(lastauthoramp) and not etal then
text[#text-2] = " & "; -- replace last separator with ampersand text
end
text[#text] = nil; -- erase the last separator
end
local result = table.concat(text) -- construct list
if etal and is_set (result) then -- etal may be set by |display-authors=etal but we might not have a last-first list
result = result .. sep .. ' ' .. cfg.messages['et al']; -- we've go a last-first list and etal so add et al.
end
return result, count
end
--[[--------------------------< A N C H O R _ I D >------------------------------------------------------------
Generates a CITEREF anchor ID if we have at least one name or a date. Otherwise returns an empty string.
namelist is one of the contributor-, author-, or editor-name lists chosen in that order. year is Year or anchor_year.
]]
local function anchor_id (namelist, year)
local names={}; -- a table for the one to four names and year
for i,v in ipairs (namelist) do -- loop through the list and take up to the first four last names
names[i] = v.last
if i == 4 then break end -- if four then done
end
table.insert (names, year); -- add the year at the end
local id = table.concat(names); -- concatenate names and year for CITEREF id
if is_set (id) then -- if concatenation is not an empty string
return "CITEREF" .. id; -- add the CITEREF portion
else
return ''; -- return an empty string; no reason to include CITEREF id in this citation
end
end
--[[--------------------------< N A M E _ H A S _ E T A L >----------------------------------------------------
Evaluates the content of name parameters (author, editor, etc) for variations on the theme of et al. If found,
the et al. is removed, a flag is set to true and the function returns the modified name and the flag.
This function never sets the flag to false but returns it's previous state because it may have been set by
previous passes through this function or by the associated |display-<names>=etal parameter
]]
local function name_has_etal (name, etal, nocat, param)
if is_set (name) then -- name can be nil in which case just return
local patterns = cfg.et_al_patterns; --get patterns from configuration
for _, pattern in ipairs (patterns) do -- loop through all of the patterns
if name:match (pattern) then -- if this 'et al' pattern is found in name
name = name:gsub (pattern, ''); -- remove the offending text
etal = true; -- set flag (may have been set previously here or by |display-<names>=etal)
if not nocat then -- no categorization for |vauthors=
table.insert( z.message_tail, {set_error ('etal', {param})}); -- and set an error if not added
end
end
end
end
return name, etal; --
end
--[[--------------------------< N A M E _ H A S _ E D _ M A R K U P >------------------------------------------
Evaluates the content of author and editor parameters for extranious editor annotations: ed, ed., eds, (Ed.), etc.
These annotation do not belong in author parameters and are redundant in editor parameters. If found, the function
adds the editor markup maintenance category.
]]
local function name_has_ed_markup (name, list_name)
local _, pattern;
local patterns = cfg.editor_markup_patterns; -- get patterns from configuration
if is_set (name) then
for _, pattern in ipairs (patterns) do -- spin through patterns table and
if name:match (pattern) then
add_maint_cat ('extra_text_names', cfg.special_case_translation [list_name]); -- add a maint cat for this template
break;
end
end
end
return name; -- and done
end
--[[--------------------------< N A M E _ H A S _ M U L T _ N A M E S >----------------------------------------
Evaluates the content of author and editor (surnames only) parameters for multiple names. Multiple names are
indicated if there is more than one comma and or semicolon. If found, the function adds the multiple name
(author or editor) maintenance category.
]]
local function name_has_mult_names (name, list_name)
local count, _;
if is_set (name) then
_, count = name:gsub ('[;,]', ''); -- count the number of separator-like characters
if 1 < count then -- param could be |author= or |editor= so one separator character is acceptable
add_maint_cat ('mult_names', cfg.special_case_translation [list_name]); -- more than one separator indicates multiple names so add a maint cat for this template
end
end
return name; -- and done
end
--[[--------------------------< N A M E _ C H E C K S >--------------------------------------------------------
This function calls various name checking functions used to validate the content of the various name-holding
parameters.
]]
local function name_checks (last, first, list_name)
if is_set (last) then
if last:match ('^%(%(.*%)%)$') then -- if wrapped in doubled parentheses, accept as written
last = last:match ('^%(%((.*)%)%)$'); -- strip parens
else
last = name_has_mult_names (last, list_name); -- check for multiple names in the parameter (last only)
last = name_has_ed_markup (last, list_name); -- check for extraneous 'editor' annotation
end
end
if is_set (first) then
if first:match ('^%(%(.*%)%)$') then -- if wrapped in doubled parentheses, accept as written
first = first:match ('^%(%((.*)%)%)$'); -- strip parens
else
first = name_has_ed_markup (first, list_name); -- check for extraneous 'editor' annotation
end
end
return last, first; -- done
end
--[[--------------------------< E X T R A C T _ N A M E S >----------------------------------------------------
Gets name list from the input arguments
Searches through args in sequential order to find |lastn= and |firstn= parameters (or their aliases), and their matching link and mask parameters.
Stops searching when both |lastn= and |firstn= are not found in args after two sequential attempts: found |last1=, |last2=, and |last3= but doesn't
find |last4= and |last5= then the search is done.
This function emits an error message when there is a |firstn= without a matching |lastn=. When there are 'holes' in the list of last names, |last1= and |last3=
are present but |last2= is missing, an error message is emitted. |lastn= is not required to have a matching |firstn=.
When an author or editor parameter contains some form of 'et al.', the 'et al.' is stripped from the parameter and a flag (etal) returned
that will cause list_people() to add the static 'et al.' text from Module:Citation/CS1/Configuration. This keeps 'et al.' out of the
template's metadata. When this occurs, the page is added to a maintenance category.
]]
local function extract_names(args, list_name)
local names = {}; -- table of names
local last; -- individual name components
local first;
local link;
local mask;
local i = 1; -- loop counter/indexer
local n = 1; -- output table indexer
local count = 0; -- used to count the number of times we haven't found a |last= (or alias for authors, |editor-last or alias for editors)
local etal=false; -- return value set to true when we find some form of et al. in an author parameter
local last_alias, first_alias; -- selected parameter aliases used in error messaging
while true do
last, last_alias = select_one( args, cfg.aliases[list_name .. '-Last'], 'redundant_parameters', i ); -- search through args for name components beginning at 1
first, first_alias = select_one( args, cfg.aliases[list_name .. '-First'], 'redundant_parameters', i );
link = select_one( args, cfg.aliases[list_name .. '-Link'], 'redundant_parameters', i );
mask = select_one( args, cfg.aliases[list_name .. '-Mask'], 'redundant_parameters', i );
last, etal = name_has_etal (last, etal, false, last_alias); -- find and remove variations on et al.
first, etal = name_has_etal (first, etal, false, first_alias); -- find and remove variations on et al.
last, first= name_checks (last, first, list_name); -- multiple names, extraneous annotation, etc checks
if first and not last then -- if there is a firstn without a matching lastn
table.insert( z.message_tail, { set_error( 'first_missing_last', {first_alias, first_alias:gsub('first', 'last')}, true ) } ); -- add this error message
elseif not first and not last then -- if both firstn and lastn aren't found, are we done?
count = count + 1; -- number of times we haven't found last and first
if 2 <= count then -- two missing names and we give up
break; -- normal exit or there is a two-name hole in the list; can't tell which
end
else -- we have last with or without a first
link_title_ok (link, list_name:match ("(%w+)List"):lower() .. '-link' .. i, last, list_name:match ("(%w+)List"):lower() .. '-last' .. i); -- check for improper wikimarkup
names[n] = {last = last, first = first, link = link, mask = mask, corporate=false}; -- add this name to our names list (corporate for |vauthors= only)
n = n + 1; -- point to next location in the names table
if 1 == count then -- if the previous name was missing
table.insert( z.message_tail, { set_error( 'missing_name', {list_name:match ("(%w+)List"):lower(), i-1}, true ) } ); -- add this error message
end
count = 0; -- reset the counter, we're looking for two consecutive missing names
end
i = i + 1; -- point to next args location
end
return names, etal; -- all done, return our list of names
end
--[[--------------------------< G E T _ I S O 6 3 9 _ C O D E >------------------------------------------------
Validates language names provided in |language= parameter if not an ISO639-1 or 639-2 code.
Returns the language name and associated two- or three-character code. Because case of the source may be incorrect
or different from the case that WikiMedia uses, the name comparisons are done in lower case and when a match is
found, the Wikimedia version (assumed to be correct) is returned along with the code. When there is no match, we
return the original language name string.
mw.language.fetchLanguageNames(<local wiki language>, 'all') returns a list of languages that in some cases may include
extensions. For example, code 'cbk-zam' and its associated name 'Chavacano de Zamboanga' (MediaWiki does not support
code 'cbk' or name 'Chavacano'. Most (all?) of these languages are not used a 'language' codes per se, rather they
are used as sub-domain names: cbk-zam.wikipedia.org. A list of language names and codes supported by fetchLanguageNames()
can be found at Template:Citation Style documentation/language/doc
Names that are included in the list will be found if that name is provided in the |language= parameter. For example,
if |language=Chavacano de Zamboanga, that name will be found with the associated code 'cbk-zam'. When names are found
and the associated code is not two or three characters, this function returns only the WikiMedia language name.
Some language names have multiple entries under different codes:
Aromanian has code rup and code roa-rup
When this occurs, this function returns the language name and the 2- or 3-character code
Adapted from code taken from Module:Check ISO 639-1.
]]
local function get_iso639_code (lang, this_wiki_code)
if cfg.lang_name_remap[lang:lower()] then -- if there is a remapped name (because MediaWiki uses something that we don't think is correct)
return cfg.lang_name_remap[lang:lower()][1], cfg.lang_name_remap[lang:lower()][2]; -- for this language 'name', return a possibly new name and appropriate code
end
local ietf_code; -- because some languages have both ietf-like codes and iso 639-like codes
local ietf_name;
local languages = mw.language.fetchLanguageNames(this_wiki_code, 'all') -- get a list of language names known to Wikimedia
-- ('all' is required for North Ndebele, South Ndebele, and Ojibwa)
local langlc = mw.ustring.lower(lang); -- lower case version for comparisons
for code, name in pairs(languages) do -- scan the list to see if we can find our language
if langlc == mw.ustring.lower(name) then
if 2 == code:len() or 3 == code:len() then -- two- or three-character codes only; extensions not supported
return name, code; -- so return the name and the code
end
ietf_code = code; -- remember that we found an ietf-like code and save its name
ietf_name = name; -- but keep looking for a 2- or 3-char code
end
end
-- didn't find name with 2- or 3-char code; if ietf-like code found return
return ietf_code and ietf_name or lang; -- associated name; return original language text else
end
--[[--------------------------< L A N G U A G E _ P A R A M E T E R >------------------------------------------
Gets language name from a provided two- or three-character ISO 639 code. If a code is recognized by MediaWiki,
use the returned name; if not, then use the value that was provided with the language parameter.
When |language= contains a recognized language (either code or name), the page is assigned to the category for
that code: Category:Norwegian-language sources (no). For valid three-character code languages, the page is assigned
to the single category for '639-2' codes: Category:CS1 ISO 639-2 language sources.
Languages that are the same as the local wiki are not categorized. MediaWiki does not recognize three-character
equivalents of two-character codes: code 'ar' is recognized bit code 'ara' is not.
This function supports multiple languages in the form |language=nb, French, th where the language names or codes are
separated from each other by commas.
]]
local function language_parameter (lang)
local code; -- the two- or three-character language code
local name; -- the language name
local language_list = {}; -- table of language names to be rendered
local names_table = {}; -- table made from the value assigned to |language=
local this_wiki_name = mw.language.fetchLanguageName(cfg.this_wiki_code, cfg.this_wiki_code); -- get this wiki's language name
names_table = mw.text.split (lang, '%s*,%s*'); -- names should be a comma separated list
for _, lang in ipairs (names_table) do -- reuse lang
name = cfg.lang_code_remap[lang:lower()]; -- first see if this is a code that is not supported by MediaWiki but is in remap
if name then -- there was a remapped code so
if not lang:match ('^%a%a%a?%-x%-%a+$') then -- if not a private ietf tag
lang = lang:gsub ('^(%a%a%a?)%-.*', '%1'); -- strip ietf tags from code
end
else
if lang:match ('^%a%a%-') then -- strip ietf tags from code; TODO: is there a need to support 3-char with tag?
lang = lang:match ('(%a%a)%-') -- keep only 639-1 code portion to lang; TODO: do something with 3166 alpha 2 country code?
end
if 2 == lang:len() or 3 == lang:len() then -- if two-or three-character code
name = mw.language.fetchLanguageName (lang:lower(), cfg.this_wiki_code); -- get language name if |language= is a proper code
end
end
if is_set (name) then -- if |language= specified a valid code
code = lang:lower(); -- save it
else
name, code = get_iso639_code (lang, cfg.this_wiki_code); -- attempt to get code from name (assign name here so that we are sure of proper capitalization)
end
if is_set (code) then -- only 2- or 3-character codes
name = cfg.lang_code_remap[code] or name; -- override wikimedia when they misuse language codes/names
if cfg.this_wiki_code ~= code then -- when the language is not the same as this wiki's language
if 2 == code:len() then -- and is a two-character code
add_prop_cat ('foreign_lang_source' .. code, {name, code}); -- categorize it; code appended to allow for multiple language categorization
else -- or is a recognized language (but has a three-character code)
add_prop_cat ('foreign_lang_source_2' .. code, {code}); -- categorize it differently TODO: support mutliple three-character code categories per cs1|2 template
end
elseif cfg.local_lang_cat_enable then -- when the language and this wiki's language are the same and categorization is enabled
add_prop_cat ('local_lang_source', {name, code}); -- categorize it
end
else
add_maint_cat ('unknown_lang'); -- add maint category if not already added
end
table.insert (language_list, name);
name = ''; -- so we can reuse it
end
code = #language_list -- reuse code as number of languages in the list
if 2 >= code then
name = table.concat (language_list, cfg.messages['parameter-pair-separator']) -- insert '<space>and<space>' between two language names
elseif 2 < code then
name = table.concat (language_list, ', '); -- and concatenate with '<comma><space>' separators
name = name:gsub (', ([^,]+)$', cfg.messages['parameter-final-separator'] .. '%1'); -- replace last '<comma><space>' separator with '<comma><space>and<space>' separator
end
if this_wiki_name == name then
return ''; -- if one language and that language is this wiki's return an empty string (no annotation)
end
return (" " .. wrap_msg ('language', name)); -- otherwise wrap with '(in ...)'
--[[ TODO: should only return blank or name rather than full list
so we can clean up the bunched parenthetical elements Language, Type, Format
]]
end
--[[--------------------------< S E T _ C S 1 _ S T Y L E >----------------------------------------------------
Set style settings for CS1 citation templates. Returns separator and postscript settings
At en.wiki, for cs1:
ps gets: '.'
sep gets: '.'
]]
local function set_cs1_style (ps)
if not is_set (ps) then -- unless explicitely set to something
ps = cfg.presentation['ps_cs1']; -- terminate the rendered citation
end
return cfg.presentation['sep_cs1'], ps; -- element separator
end
--[[--------------------------< S E T _ C S 2 _ S T Y L E >----------------------------------------------------
Set style settings for CS2 citation templates. Returns separator, postscript, ref settings
At en.wiki, for cs2:
ps gets: '' (empty string - no terminal punctuation)
sep gets: ','
]]
local function set_cs2_style (ps, ref)
if not is_set (ps) then -- if |postscript= has not been set, set cs2 default
ps = cfg.presentation['ps_cs2']; -- terminate the rendered citation
end
if not is_set (ref) then -- if |ref= is not set
ref = "harv"; -- set default |ref=harv
end
return cfg.presentation['sep_cs2'], ps, ref; -- element separator
end
--[[--------------------------< G E T _ S E T T I N G S _ F R O M _ C I T E _ C L A S S >----------------------
When |mode= is not set or when its value is invalid, use config.CitationClass and parameter values to establish
rendered style.
]]
local function get_settings_from_cite_class (ps, ref, cite_class)
local sep;
if (cite_class == "citation") then -- for citation templates (CS2)
sep, ps, ref = set_cs2_style (ps, ref);
else -- not a citation template so CS1
sep, ps = set_cs1_style (ps);
end
return sep, ps, ref -- return them all
end
--[[--------------------------< S E T _ S T Y L E >------------------------------------------------------------
Establish basic style settings to be used when rendering the citation. Uses |mode= if set and valid or uses
config.CitationClass from the template's #invoke: to establish style.
]]
local function set_style (mode, ps, ref, cite_class)
local sep;
if 'cs2' == mode then -- if this template is to be rendered in CS2 (citation) style
sep, ps, ref = set_cs2_style (ps, ref);
elseif 'cs1' == mode then -- if this template is to be rendered in CS1 (cite xxx) style
sep, ps = set_cs1_style (ps);
else -- anything but cs1 or cs2
sep, ps, ref = get_settings_from_cite_class (ps, ref, cite_class); -- get settings based on the template's CitationClass
end
if 'none' == ps:lower() then -- if assigned value is 'none' then
ps = ''; -- set to empty string
end
return sep, ps, ref
end
--[=[-------------------------< I S _ P D F >------------------------------------------------------------------
Determines if a url has the file extension that is one of the pdf file extensions used by [[MediaWiki:Common.css]] when
applying the pdf icon to external links.
returns true if file extension is one of the recognized extensions, else false
]=]
local function is_pdf (url)
return url:match ('%.pdf$') or url:match ('%.PDF$') or
url:match ('%.pdf[%?#]') or url:match ('%.PDF[%?#]') or
url:match ('%.PDF#') or url:match ('%.pdf#');
end
--[[--------------------------< S T Y L E _ F O R M A T >------------------------------------------------------
Applies css style to |format=, |chapter-format=, etc. Also emits an error message if the format parameter does
not have a matching url parameter. If the format parameter is not set and the url contains a file extension that
is recognized as a pdf document by MediaWiki's commons.css, this code will set the format parameter to (PDF) with
the appropriate styling.
]]
local function style_format (format, url, fmt_param, url_param)
if is_set (format) then
format = wrap_style ('format', format); -- add leading space, parentheses, resize
if not is_set (url) then
format = format .. set_error( 'format_missing_url', {fmt_param, url_param} ); -- add an error message
end
elseif is_pdf (url) then -- format is not set so if url is a pdf file then
format = wrap_style ('format', 'PDF'); -- set format to pdf
else
format = ''; -- empty string for concatenation
end
return format;
end
--[[--------------------------< G E T _ D I S P L A Y _ N A M E S >--------------------------------------------
Returns a number that defines the number of names displayed for author and editor name lists and a boolean flag
to indicate when et al. should be appended to the name list.
When the value assigned to |display-xxxxors= is a number greater than or equal to zero, return the number and
the previous state of the 'etal' flag (false by default but may have been set to true if the name list contains
some variant of the text 'et al.').
When the value assigned to |display-xxxxors= is the keyword 'etal', return a number that is one greater than the
number of authors in the list and set the 'etal' flag true. This will cause the list_people() to display all of
the names in the name list followed by 'et al.'
In all other cases, returns nil and the previous state of the 'etal' flag.
inputs:
max: A['DisplayAuthors'] or A['DisplayEditors']; a number or some flavor of etal
count: #a or #e
list_name: 'authors' or 'editors'
etal: author_etal or editor_etal
]]
local function get_display_names (max, count, list_name, etal)
if is_set (max) then
if 'etal' == max:lower():gsub("[ '%.]", '') then -- the :gsub() portion makes 'etal' from a variety of 'et al.' spellings and stylings
max = count + 1; -- number of authors + 1 so display all author name plus et al.
etal = true; -- overrides value set by extract_names()
elseif max:match ('^%d+$') then -- if is a string of numbers
max = tonumber (max); -- make it a number
if max >= count then -- if |display-xxxxors= value greater than or equal to number of authors/editors
add_maint_cat ('disp_name', cfg.special_case_translation [list_name]);
end
else -- not a valid keyword or number
table.insert( z.message_tail, { set_error( 'invalid_param_val', {'display-' .. list_name, max}, true ) } ); -- add error message
max = nil; -- unset; as if |display-xxxxors= had not been set
end
end
return max, etal;
end
--[[--------------------------< E X T R A _ T E X T _ I N _ P A G E _ C H E C K >------------------------------
Adds page to Category:CS1 maint: extra text if |page= or |pages= has what appears to be some form of p. or pp.
abbreviation in the first characters of the parameter content.
check Page and Pages for extraneous p, p., pp, and pp. at start of parameter value:
good pattern: '^P[^%.P%l]' matches when |page(s)= begins PX or P# but not Px where x and X are letters and # is a dgiit
bad pattern: '^[Pp][Pp]' matches matches when |page(s)= begins pp or pP or Pp or PP
]]
local function extra_text_in_page_check (page)
local good_pattern = '^P[^%.Pp]'; -- ok to begin with uppercase P: P7 (pg 7 of section P) but not p123 (page 123) TODO: add Gg for PG or Pg?
local bad_pattern = '^[Pp]?[Pp]%.?[ %d]';
if not page:match (good_pattern) and (page:match (bad_pattern) or page:match ('^[Pp]ages?')) then
add_maint_cat ('extra_text');
end
end
--[=[-------------------------< G E T _ V _ N A M E _ T A B L E >----------------------------------------------
split apart a |vauthors= or |veditors= parameter. This function allows for corporate names, wrapped in doubled
parentheses to also have commas; in the old version of the code, the doubled parnetheses were included in the
rendered citation and in the metadata. Individual author names may be wikilinked
|vauthors=Jones AB, [[E. B. White|White EB]], ((Black, Brown, and Co.))
]=]
local function get_v_name_table (vparam, output_table, output_link_table)
local name_table = mw.text.split(vparam, "%s*,%s*"); -- names are separated by commas
local wl_type, label, link; -- wl_type not used here; just a place holder
local i = 1;
while name_table[i] do
if name_table[i]:match ('^%(%(.*[^%)][^%)]$') then -- first segment of corporate with one or more commas; this segment has the opening doubled parens
local name = name_table[i];
i=i+1; -- bump indexer to next segment
while name_table[i] do
name = name .. ', ' .. name_table[i]; -- concatenate with previous segments
if name_table[i]:match ('^.*%)%)$') then -- if this table member has the closing doubled parens
break; -- and done reassembling so
end
i=i+1; -- bump indexer
end
table.insert (output_table, name); -- and add corporate name to the output table
table.insert (output_link_table, ''); -- no wikilink
else
wl_type, label, link = is_wikilink (name_table[i]); -- wl_type is: 0, no wl (text in label variable); 1, [[D]]; 2, [[L|D]]
table.insert (output_table, label); -- add this name
if 1 == wl_type then
table.insert (output_link_table, label); -- simple wikilink [[D]]
else
table.insert (output_link_table, link); -- no wikilink or [[L|D]]; add this link if there is one, else empty string
end
end
i = i+1;
end
return output_table;
end
--[[--------------------------< P A R S E _ V A U T H O R S _ V E D I T O R S >--------------------------------
This function extracts author / editor names from |vauthors= or |veditors= and finds matching |xxxxor-maskn= and
|xxxxor-linkn= in args. It then returns a table of assembled names just as extract_names() does.
Author / editor names in |vauthors= or |veditors= must be in Vancouver system style. Corporate or institutional names
may sometimes be required and because such names will often fail the is_good_vanc_name() and other format compliance
tests, are wrapped in doubled paranethese ((corporate name)) to suppress the format tests.
Supports generational suffixes Jr, 2nd, 3rd, 4th–6th.
This function sets the vancouver error when a reqired comma is missing and when there is a space between an author's initials.
]]
local function parse_vauthors_veditors (args, vparam, list_name)
local names = {}; -- table of names assembled from |vauthors=, |author-maskn=, |author-linkn=
local v_name_table = {};
local v_link_table = {}; -- when name is wikilinked, targets go in this table
local etal = false; -- return value set to true when we find some form of et al. vauthors parameter
local last, first, link, mask, suffix;
local corporate = false;
vparam, etal = name_has_etal (vparam, etal, true); -- find and remove variations on et al. do not categorize (do it here because et al. might have a period)
v_name_table = get_v_name_table (vparam, v_name_table, v_link_table); -- names are separated by commas
for i, v_name in ipairs(v_name_table) do
if v_name:match ('^%(%(.+%)%)$') then -- corporate authors are wrapped in doubled parentheses to supress vanc formatting and error detection
first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor
last = v_name:match ('^%(%((.+)%)%)$') -- remove doubled parntheses
corporate = true; -- flag used in list_people()
elseif string.find(v_name, "%s") then
if v_name:find('[;%.]') then -- look for commonly occurring punctuation characters;
add_vanc_error ('punctuation');
end
local lastfirstTable = {}
lastfirstTable = mw.text.split(v_name, "%s")
first = table.remove(lastfirstTable); -- removes and returns value of last element in table which should be author intials
if is_suffix (first) then -- if a valid suffix
suffix = first -- save it as a suffix and
first = table.remove(lastfirstTable); -- get what should be the initials from the table
end -- no suffix error message here because letter combination may be result of Romanization; check for digits?
last = table.concat(lastfirstTable, " ") -- returns a string that is the concatenation of all other names that are not initials
if mw.ustring.match (last, '%a+%s+%u+%s+%a+') then
add_vanc_error ('missing comma'); -- matches last II last; the case when a comma is missing
end
if mw.ustring.match (v_name, ' %u %u$') then -- this test is in the wrong place TODO: move or replace with a more appropriate test
add_vanc_error ('name'); -- matches a space between two intiials
end
else
first = ''; -- set to empty string for concatenation and because it may have been set for previous author/editor
last = v_name; -- last name or single corporate name? Doesn't support multiword corporate names? do we need this?
end
if is_set (first) then
if not mw.ustring.match (first, "^%u?%u$") then -- first shall contain one or two upper-case letters, nothing else
add_vanc_error ('initials'); -- too many initials; mixed case initials (which may be ok Romanization); hyphenated initials
end
is_good_vanc_name (last, first); -- check first and last before restoring the suffix which may have a non-Latin digit
if is_set (suffix) then
first = first .. ' ' .. suffix; -- if there was a suffix concatenate with the initials
suffix = ''; -- unset so we don't add this suffix to all subsequent names
end
else
if not corporate then
is_good_vanc_name (last, '');
end
end
link = select_one( args, cfg.aliases[list_name .. '-Link'], 'redundant_parameters', i ) or v_link_table[i];
mask = select_one( args, cfg.aliases[list_name .. '-Mask'], 'redundant_parameters', i );
names[i] = {last = last, first = first, link = link, mask = mask, corporate=corporate}; -- add this assembled name to our names list
end
return names, etal; -- all done, return our list of names
end
--[[--------------------------< S E L E C T _ A U T H O R _ E D I T O R _ S O U R C E >------------------------
Select one of |authors=, |authorn= / |lastn / firstn=, or |vauthors= as the source of the author name list or
select one of |editors=, |editorn= / editor-lastn= / |editor-firstn= or |veditors= as the source of the editor name list.
Only one of these appropriate three will be used. The hierarchy is: |authorn= (and aliases) highest and |authors= lowest and
similarly, |editorn= (and aliases) highest and |editors= lowest
When looking for |authorn= / |editorn= parameters, test |xxxxor1= and |xxxxor2= (and all of their aliases); stops after the second
test which mimicks the test used in extract_names() when looking for a hole in the author name list. There may be a better
way to do this, I just haven't discovered what that way is.
Emits an error message when more than one xxxxor name source is provided.
In this function, vxxxxors = vauthors or veditors; xxxxors = authors or editors as appropriate.
]]
local function select_author_editor_source (vxxxxors, xxxxors, args, list_name)
local lastfirst = false;
if select_one( args, cfg.aliases[list_name .. '-Last'], 'none', 1 ) or -- do this twice incase we have a |first1= without a |last1=; this ...
select_one( args, cfg.aliases[list_name .. '-First'], 'none', 1 ) or -- ... also catches the case where |first= is used with |vauthors=
select_one( args, cfg.aliases[list_name .. '-Last'], 'none', 2 ) or
select_one( args, cfg.aliases[list_name .. '-First'], 'none', 2 ) then
lastfirst=true;
end
if (is_set (vxxxxors) and true == lastfirst) or -- these are the three error conditions
(is_set (vxxxxors) and is_set (xxxxors)) or
(true == lastfirst and is_set (xxxxors)) then
local err_name;
if 'AuthorList' == list_name then -- figure out which name should be used in error message
err_name = 'author';
else
err_name = 'editor';
end
table.insert( z.message_tail, { set_error( 'redundant_parameters',
{err_name .. '-name-list parameters'}, true ) } ); -- add error message
end
if true == lastfirst then return 1 end; -- return a number indicating which author name source to use
if is_set (vxxxxors) then return 2 end;
if is_set (xxxxors) then return 3 end;
return 1; -- no authors so return 1; this allows missing author name test to run in case there is a first without last
end
--[[--------------------------< I S _ V A L I D _ P A R A M E T E R _ V A L U E >------------------------------
This function is used to validate a parameter's assigned value for those parameters that have only a limited number
of allowable values (yes, y, true, live, dead, etc). When the parameter value has not been assigned a value (missing
or empty in the source template) the function returns the value specified by ret_val. If the parameter value is one
of the list of allowed values returns the translated value; else, emits an error message and returns the value
specified by ret_val.
]]
local function is_valid_parameter_value (value, name, possible, ret_val)
if not is_set (value) then
return ret_val; -- an empty parameter is ok
elseif in_array (value, possible) then
return cfg.keywords_xlate[value]; -- return translation of parameter keyword
else
table.insert( z.message_tail, { set_error( 'invalid_param_val', {name, value}, true ) } ); -- not an allowed value so add error message
return ret_val;
end
end
--[[--------------------------< T E R M I N A T E _ N A M E _ L I S T >----------------------------------------
This function terminates a name list (author, contributor, editor) with a separator character (sepc) and a space
when the last character is not a sepc character or when the last three characters are not sepc followed by two
closing square brackets (close of a wikilink). When either of these is true, the name_list is terminated with a
single space character.
]]
local function terminate_name_list (name_list, sepc)
if (string.sub (name_list,-3,-1) == sepc .. '. ') then -- if already properly terminated
return name_list; -- just return the name list
elseif (string.sub (name_list,-1,-1) == sepc) or (string.sub (name_list,-3,-1) == sepc .. ']]') then -- if last name in list ends with sepc char
return name_list .. " "; -- don't add another
else
return name_list .. sepc .. ' '; -- otherwise terninate the name list
end
end
--[[-------------------------< F O R M A T _ V O L U M E _ I S S U E >----------------------------------------
returns the concatenation of the formatted volume and issue parameters as a single string; or formatted volume
or formatted issue, or an empty string if neither are set.
]]
local function format_volume_issue (volume, issue, cite_class, origin, sepc, lower)
if not is_set (volume) and not is_set (issue) then
return '';
end
if 'magazine' == cite_class or (in_array (cite_class, {'citation', 'map'}) and 'magazine' == origin) then
if is_set (volume) and is_set (issue) then
return wrap_msg ('vol-no', {sepc, volume, issue}, lower);
elseif is_set (volume) then
return wrap_msg ('vol', {sepc, volume}, lower);
else
return wrap_msg ('issue', {sepc, issue}, lower);
end
end
if 'podcast' == cite_class and is_set (issue) then
return wrap_msg ('issue', {sepc, issue}, lower);
end
local vol = ''; -- here for all cites except magazine
if is_set (volume) then
if volume:match ('^[MDCLXVI]+$') or volume:match ('^%d+$')then -- volume value is all digits or all uppercase roman numerals
vol = substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash(volume)}); -- render in bold face
elseif (4 < mw.ustring.len(volume)) then -- not all digits or roman numerals and longer than 4 characters
vol = substitute (cfg.messages['j-vol'], {sepc, volume}); -- not bold
add_prop_cat ('long_vol');
else -- four or less characters
vol = substitute (cfg.presentation['vol-bold'], {sepc, hyphen_to_dash(volume)}); -- bold
end
end
if is_set (issue) then
return vol .. substitute (cfg.messages['j-issue'], issue);
end
return vol;
end
--[[-------------------------< F O R M A T _ P A G E S _ S H E E T S >-----------------------------------------
adds static text to one of |page(s)= or |sheet(s)= values and returns it with all of the others set to empty strings.
The return order is:
page, pages, sheet, sheets
Singular has priority over plural when both are provided.
]]
local function format_pages_sheets (page, pages, sheet, sheets, cite_class, origin, sepc, nopp, lower)
if 'map' == cite_class then -- only cite map supports sheet(s) as in-source locators
if is_set (sheet) then
if 'journal' == origin then
return '', '', wrap_msg ('j-sheet', sheet, lower), '';
else
return '', '', wrap_msg ('sheet', {sepc, sheet}, lower), '';
end
elseif is_set (sheets) then
if 'journal' == origin then
return '', '', '', wrap_msg ('j-sheets', sheets, lower);
else
return '', '', '', wrap_msg ('sheets', {sepc, sheets}, lower);
end
end
end
local is_journal = 'journal' == cite_class or (in_array (cite_class, {'citation', 'map', 'interview'}) and 'journal' == origin);
if is_set (page) then
if is_journal then
return substitute (cfg.messages['j-page(s)'], page), '', '', '';
elseif not nopp then
return substitute (cfg.messages['p-prefix'], {sepc, page}), '', '', '';
else
return substitute (cfg.messages['nopp'], {sepc, page}), '', '', '';
end
elseif is_set(pages) then
if is_journal then
return substitute (cfg.messages['j-page(s)'], pages), '', '', '';
elseif tonumber(pages) ~= nil and not nopp then -- if pages is only digits, assume a single page number
return '', substitute (cfg.messages['p-prefix'], {sepc, pages}), '', '';
elseif not nopp then
return '', substitute (cfg.messages['pp-prefix'], {sepc, pages}), '', '';
else
return '', substitute (cfg.messages['nopp'], {sepc, pages}), '', '';
end
end
return '', '', '', ''; -- return empty strings
end
--[[--------------------------< I N S O U R C E _ L O C _ G E T >----------------------------------------------
returns one of the in-source locators: page, pages, or at.
If any of these are interwiki links to wikisource, returns the label portion of the interwikilink as plain text
for use in COinS. This COinS thing is done because here we convert an interwiki link to and external link and
add an icon span around that; get_coins_pages() doesn't know about the span. TODO: should it?
TODO: add support for sheet and sheets?; streamline;
TODO: make it so that this function returns only one of the three as the single in-source (the return value assigned
to a new name)?
]]
local function insource_loc_get (page, pages, at)
local ws_url, ws_label, coins_pages, L; -- for wikisource interwikilinks; TODO: this corrupts page metadata (span remains in place after cleanup; fix there?)
if is_set (page) then
if is_set (pages) or is_set(at) then
pages = ''; -- unset the others
at = '';
end
extra_text_in_page_check (page); -- add this page to maint cat if |page= value begins with what looks like p. or pp.
ws_url, ws_label, L = wikisource_url_make (page); -- make ws url from |page= interwiki link; link portion L becomes tool tip label
if ws_url then
page = external_link (ws_url, ws_label .. ' ', 'ws link in page'); -- space char after label to move icon away from in-source text; TODO: a better way to do this?
page = substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, page});
coins_pages = ws_label;
end
elseif is_set (pages) then
if is_set (at) then
at = ''; -- unset
end
extra_text_in_page_check (pages); -- add this page to maint cat if |pages= value begins with what looks like p. or pp.
ws_url, ws_label, L = wikisource_url_make (pages); -- make ws url from |pages= interwiki link; link portion L becomes tool tip label
if ws_url then
pages = external_link (ws_url, ws_label .. ' ', 'ws link in pages'); -- space char after label to move icon away from in-source text; TODO: a better way to do this?
pages = substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, pages});
coins_pages = ws_label;
end
elseif is_set (at) then
ws_url, ws_label, L = wikisource_url_make (at); -- make ws url from |at= interwiki link; link portion L becomes tool tip label
if ws_url then
at = external_link (ws_url, ws_label .. ' ', 'ws link in at'); -- space char after label to move icon away from in-source text; TODO: a better way to do this?
at = substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, at});
coins_pages = ws_label;
end
end
return page, pages, at, coins_pages;
end
--[=[-------------------------< A R C H I V E _ U R L _ C H E C K >--------------------------------------------
Check archive.org urls to make sure they at least look like they are pointing at valid archives and not to the
save snapshot url or to calendar pages. When the archive url is 'https://web.archive.org/save/' (or http://...)
archive.org saves a snapshot of the target page in the url. That is something that Wikipedia should not allow
unwitting readers to do.
When the archive.org url does not have a complete timestamp, archive.org chooses a snapshot according to its own
algorithm or provides a calendar 'search' result. [[WP:ELNO]] discourages links to search results.
This function looks at the value assigned to |archive-url= and returns empty strings for |archive-url= and
|archive-date= and an error message when:
|archive-url= holds an archive.org save command url
|archive-url= is an archive.org url that does not have a complete timestamp (YYYYMMDDhhmmss 14 digits) in the
correct place
otherwise returns |archive-url= and |archive-date=
There are two mostly compatible archive.org urls:
//web.archive.org/<timestamp>... -- the old form
//web.archive.org/web/<timestamp>... -- the new form
The old form does not support or map to the new form when it contains a display flag. There are four identified flags
('id_', 'js_', 'cs_', 'im_') but since archive.org ignores others following the same form (two letters and an underscore)
we don't check for these specific flags but we do check the form.
This function supports a preview mode. When the article is rendered in preview mode, this funct may return a modified
archive url:
for save command errors, return undated wildcard (/*/)
for timestamp errors when the timestamp has a wildcard, return the url unmodified
for timestamp errors when the timestamp does not have a wildcard, return with timestamp limited to six digits plus wildcard (/yyyymm*/)
]=]
local function archive_url_check (url, date)
local err_msg = ''; -- start with the error message empty
local path, timestamp, flag; -- portions of the archive.or url
if (not url:match('//web%.archive%.org/')) and (not url:match('//liveweb%.archive%.org/')) then -- also deprecated liveweb Wayback machine url
return url, date; -- not an archive.org archive, return ArchiveURL and ArchiveDate
end
if url:match('//web%.archive%.org/save/') then -- if a save command url, we don't want to allow saving of the target page
err_msg = 'save command';
url = url:gsub ('(//web%.archive%.org)/save/', '%1/*/', 1); -- for preview mode: modify ArchiveURL
elseif url:match('//liveweb%.archive%.org/') then
err_msg = 'liveweb';
else
path, timestamp, flag = url:match('//web%.archive%.org/([^%d]*)(%d+)([^/]*)/'); -- split out some of the url parts for evaluation
if not is_set(timestamp) or 14 ~= timestamp:len() then -- path and flag optional, must have 14-digit timestamp here
err_msg = 'timestamp';
if '*' ~= flag then
url=url:gsub ('(//web%.archive%.org/[^%d]*%d?%d?%d?%d?%d?%d?)[^/]*', '%1*', 1) -- for preview, modify ts to be yearmo* max (0-6 digits plus splat)
end
elseif is_set(path) and 'web/' ~= path then -- older archive urls do not have the extra 'web/' path element
err_msg = 'path';
elseif is_set (flag) and not is_set (path) then -- flag not allowed with the old form url (without the 'web/' path element)
err_msg = 'flag';
elseif is_set (flag) and not flag:match ('%a%a_') then -- flag if present must be two alpha characters and underscore (requires 'web/' path element)
err_msg = 'flag';
else
return url, date; -- return archiveURL and ArchiveDate
end
end
-- if here, something not right so
table.insert( z.message_tail, { set_error( 'archive_url', {err_msg}, true ) } ); -- add error message and
if is_set (Frame:preprocess('{{REVISIONID}}')) then
return '', ''; -- return empty strings for archiveURL and ArchiveDate
else
return url, date; -- preview mode so return archiveURL and ArchiveDate
end
end
--[[--------------------------< P L A C E _ C H E C K >--------------------------------------------------------
check |place=, |publication-place=, |location= to see if these params include digits. This function added because
many editors mis-use location to specify the in-source location (|page(s)= and |at= are supposed to do that)
returns the original parameter value without modification; added maint cat when parameter value contains digits
]]
local function place_check (param_val)
if not is_set (param_val) then -- parameter empty or omitted
return param_val; -- return that empty state
end
if mw.ustring.find (param_val, '%d') then -- not empty, are there digits in the parameter value
add_maint_cat ('location'); -- yep, add maint cat
end
return param_val; -- and done
end
--[[--------------------------< C I T A T I O N 0 >------------------------------------------------------------
This is the main function doing the majority of the citation formatting.
]]
local function citation0( config, args)
--[[
Load Input Parameters
The argument_wrapper facilitates the mapping of multiple aliases to single internal variable.
]]
local A = argument_wrapper( args );
local i
-- Pick out the relevant fields from the arguments. Different citation templates
-- define different field names for the same underlying things.
local Mode = is_valid_parameter_value (A['Mode'], A:ORIGIN('Mode'), cfg.keywords_lists['mode'], '');
local author_etal;
local a = {}; -- authors list from |lastn= / |firstn= pairs or |vauthors=
local Authors;
local NameListFormat = is_valid_parameter_value (A['NameListFormat'], A:ORIGIN('NameListFormat'), cfg.keywords_lists['name-list-format'], '');
local Collaboration = A['Collaboration'];
do -- to limit scope of selected
local selected = select_author_editor_source (A['Vauthors'], A['Authors'], args, 'AuthorList');
if 1 == selected then
a, author_etal = extract_names (args, 'AuthorList'); -- fetch author list from |authorn= / |lastn= / |firstn=, |author-linkn=, and |author-maskn=
elseif 2 == selected then
NameListFormat = 'vanc'; -- override whatever |name-list-format= might be
a, author_etal = parse_vauthors_veditors (args, args.vauthors, 'AuthorList'); -- fetch author list from |vauthors=, |author-linkn=, and |author-maskn=
elseif 3 == selected then
Authors = A['Authors']; -- use content of |authors=
if 'authors' == A:ORIGIN('Authors') then -- but add a maint cat if the parameter is |authors=
add_maint_cat ('authors'); -- because use of this parameter is discouraged; what to do about the aliases is a TODO:
end
end
if is_set (Collaboration) then
author_etal = true; -- so that |display-authors=etal not required
end
end
local Others = A['Others'];
local editor_etal;
local e = {}; -- editors list from |editor-lastn= / |editor-firstn= pairs or |veditors=
local Editors;
do -- to limit scope of selected
local selected = select_author_editor_source (A['Veditors'], A['Editors'], args, 'EditorList');
if 1 == selected then
e, editor_etal = extract_names (args, 'EditorList'); -- fetch editor list from |editorn= / |editor-lastn= / |editor-firstn=, |editor-linkn=, and |editor-maskn=
elseif 2 == selected then
NameListFormat = 'vanc'; -- override whatever |name-list-format= might be
e, editor_etal = parse_vauthors_veditors (args, args.veditors, 'EditorList'); -- fetch editor list from |veditors=, |editor-linkn=, and |editor-maskn=
elseif 3 == selected then
Editors = A['Editors']; -- use content of |editors=
add_maint_cat ('editors'); -- but add a maint cat because use of this parameter is discouraged
end
end
local translator_etal;
local t = {}; -- translators list from |translator-lastn= / translator-firstn= pairs
local Translators; -- assembled translators name list
t = extract_names (args, 'TranslatorList'); -- fetch translator list from |translatorn= / |translator-lastn=, -firstn=, -linkn=, -maskn=
local interviewer_etal;
local interviewers_list = {};
local Interviewers; -- used later
interviewers_list = extract_names (args, 'InterviewerList'); -- process preferred interviewers parameters
local contributor_etal;
local c = {}; -- contributors list from |contributor-lastn= / contributor-firstn= pairs
local Contributors; -- assembled contributors name list
local Contribution = A['Contribution'];
if in_array(config.CitationClass, {"book","citation"}) and not is_set(A['Periodical']) then -- |contributor= and |contribution= only supported in book cites
c = extract_names (args, 'ContributorList'); -- fetch contributor list from |contributorn= / |contributor-lastn=, -firstn=, -linkn=, -maskn=
if 0 < #c then
if not is_set (Contribution) then -- |contributor= requires |contribution=
table.insert( z.message_tail, { set_error( 'contributor_missing_required_param', 'contribution')}); -- add missing contribution error message
c = {}; -- blank the contributors' table; it is used as a flag later
end
if 0 == #a then -- |contributor= requires |author=
table.insert( z.message_tail, { set_error( 'contributor_missing_required_param', 'author')}); -- add missing author error message
c = {}; -- blank the contributors' table; it is used as a flag later
end
end
else -- if not a book cite
if select_one (args, cfg.aliases['ContributorList-Last'], 'redundant_parameters', 1 ) then -- are there contributor name list parameters?
table.insert( z.message_tail, { set_error( 'contributor_ignored')}); -- add contributor ignored error message
end
Contribution = nil; -- unset
end
if is_set (Others) then
if 0 == #a and 0 == #e then -- add maint cat when |others= has value and used without |author=, |editor=
add_maint_cat ('others');
end
end
local Year = A['Year'];
local PublicationDate = A['PublicationDate'];
local OrigYear = A['OrigYear'];
local Date = A['Date'];
local LayDate = A['LayDate'];
------------------------------------------------- Get title data
local Title = A['Title'];
local ScriptTitle = A['ScriptTitle'];
local BookTitle = A['BookTitle'];
local Conference = A['Conference'];
local TransTitle = A['TransTitle'];
local TitleNote = A['TitleNote'];
local TitleLink = A['TitleLink'];
link_title_ok (TitleLink, A:ORIGIN ('TitleLink'), Title, 'title'); -- check for wikimarkup in |title-link= or wikimarkup in |title= when |title-link= is set
local Chapter = A['Chapter'];
local ScriptChapter = A['ScriptChapter'];
local ScriptChapterOrigin = A:ORIGIN ('ScriptChapter');
local ChapterLink -- = A['ChapterLink']; -- deprecated as a parameter but still used internally by cite episode
local TransChapter = A['TransChapter'];
local TitleType = A['TitleType'];
local Degree = A['Degree'];
local Docket = A['Docket'];
local ArchiveFormat = A['ArchiveFormat'];
local ArchiveDate;
local ArchiveURL;
ArchiveURL, ArchiveDate = archive_url_check (A['ArchiveURL'], A['ArchiveDate'])
local UrlStatus = is_valid_parameter_value (A['UrlStatus'], A:ORIGIN('UrlStatus'), cfg.keywords_lists['url-status'], '');
local URL = A['URL']
local URLorigin = A:ORIGIN('URL'); -- get name of parameter that holds URL
local ChapterURL = A['ChapterURL'];
local ChapterURLorigin = A:ORIGIN('ChapterURL'); -- get name of parameter that holds ChapterURL
local ConferenceFormat = A['ConferenceFormat'];
local ConferenceURL = A['ConferenceURL'];
local ConferenceURLorigin = A:ORIGIN('ConferenceURL'); -- get name of parameter that holds ConferenceURL
local Periodical = A['Periodical'];
local Periodical_origin = '';
if is_set (Periodical) then
Periodical_origin = A:ORIGIN('Periodical'); -- get the name of the periodical parameter
local i;
Periodical, i = strip_apostrophe_markup (Periodical); -- strip appostrophe markup so that metadata isn't contaminated
if i then -- non-zero when markup was stripped so emit an error message
table.insert( z.message_tail, {set_error ('apostrophe_markup', {Periodical_origin}, true)});
end
end
local ScriptPeriodical = A['ScriptPeriodical'];
local ScriptPeriodical_origin = A:ORIGIN('ScriptPeriodical');
-- web and news not tested for now because of
-- Wikipedia:Administrators%27_noticeboard#Is_there_a_semi-automated_tool_that_could_fix_these_annoying_"Cite_Web"_errors?
if not (is_set (Periodical) or is_set (ScriptPeriodical)) then -- 'periodical' templates require periodical parameter
-- local p = {['journal'] = 'journal', ['magazine'] = 'magazine', ['news'] = 'newspaper', ['web'] = 'website'}; -- for error message
local p = {['journal'] = 'journal', ['magazine'] = 'magazine'}; -- for error message
if p[config.CitationClass] then
table.insert( z.message_tail, {set_error ('missing_periodical', {config.CitationClass, p[config.CitationClass]}, true)});
end
end
local TransPeriodical = A['TransPeriodical'];
local Series = A['Series'];
local Volume;
local Issue;
local Page;
local Pages;
local At;
if 'citation' == config.CitationClass then
if is_set (Periodical) then
if not in_array (Periodical_origin, {'website', 'mailinglist'}) then -- {{citation}} does not render volume for these 'periodicals'
Volume = A['Volume']; -- but does for all other 'periodicals'
end
elseif is_set (ScriptPeriodical) then
if 'script-website' ~= ScriptPeriodical_origin then -- {{citation}} does not render volume for |script-website=
Volume = A['Volume']; -- but does for all other 'periodicals'
end
else
Volume = A['Volume']; -- and does for non-'periodical' cites
end
elseif in_array (config.CitationClass, cfg.templates_using_volume) then -- render |volume= for cs1 according to the configuration settings
Volume = A['Volume'];
end
if 'citation' == config.CitationClass then
if is_set (Periodical) and in_array (Periodical_origin, {'journal', 'magazine', 'newspaper', 'periodical', 'work'}) or -- {{citation}} renders issue for these 'periodicals'
is_set (ScriptPeriodical) and in_array (ScriptPeriodical_origin, {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-work'}) then -- and these 'script-periodicals'
Issue = hyphen_to_dash (A['Issue']);
end
elseif in_array (config.CitationClass, cfg.templates_using_issue) then -- conference & map books do not support issue; {{citation}} listed here because included in settings table
if not (in_array (config.CitationClass, {'conference', 'map', 'citation'}) and not (is_set (Periodical) or is_set (ScriptPeriodical))) then
Issue = hyphen_to_dash (A['Issue']);
end
end
local Position = '';
if not in_array (config.CitationClass, cfg.templates_not_using_page) then
Page = A['Page'];
Pages = hyphen_to_dash (A['Pages']);
At = A['At'];
end
local Edition = A['Edition'];
local PublicationPlace = place_check (A['PublicationPlace'], A:ORIGIN('PublicationPlace'));
local Place = place_check (A['Place'], A:ORIGIN('Place'));
local PublisherName = A['PublisherName'];
local PublisherName_origin = A:ORIGIN('PublisherName');
if is_set (PublisherName) then
local i=0;
PublisherName, i = strip_apostrophe_markup (PublisherName); -- strip appostrophe markup so that metadata isn't contaminated; publisher is never italicized
if i then -- non-zero when markup was stripped so emit an error message
table.insert( z.message_tail, {set_error ('apostrophe_markup', {PublisherName_origin}, true)});
end
end
local UrlAccess = is_valid_parameter_value (A['UrlAccess'], A:ORIGIN('UrlAccess'), cfg.keywords_lists['url-access'], nil);
if not is_set(URL) and is_set(UrlAccess) then
UrlAccess = nil;
table.insert( z.message_tail, { set_error( 'param_access_requires_param', {'url'}, true ) } );
end
local ChapterUrlAccess = is_valid_parameter_value (A['ChapterUrlAccess'], A:ORIGIN('ChapterUrlAccess'), cfg.keywords_lists['url-access'], nil);
if not is_set(ChapterURL) and is_set(ChapterUrlAccess) then
ChapterUrlAccess = nil;
table.insert( z.message_tail, { set_error( 'param_access_requires_param', {A:ORIGIN('ChapterUrlAccess'):gsub ('%-access', '')}, true ) } );
end
local MapUrlAccess = is_valid_parameter_value (A['MapUrlAccess'], A:ORIGIN('MapUrlAccess'), cfg.keywords_lists['url-access'], nil);
if not is_set(A['MapURL']) and is_set(MapUrlAccess) then
MapUrlAccess = nil;
table.insert( z.message_tail, { set_error( 'param_access_requires_param', {'map-url'}, true ) } );
end
local Via = A['Via'];
local AccessDate = A['AccessDate'];
local Agency = A['Agency'];
local Language = A['Language'];
local Format = A['Format'];
local ChapterFormat = A['ChapterFormat'];
local DoiBroken = A['DoiBroken'];
local ID = A['ID'];
local ASINTLD = A['ASINTLD'];
local IgnoreISBN = is_valid_parameter_value (A['IgnoreISBN'], A:ORIGIN('IgnoreISBN'), cfg.keywords_lists['yes_true_y'], nil);
local Embargo = A['Embargo'];
local Class = A['Class']; -- arxiv class identifier
local ID_list = extract_ids( args );
if is_set (DoiBroken) and not ID_list['DOI'] then
table.insert( z.message_tail, { set_error( 'doibroken_missing_doi', A:ORIGIN('DoiBroken'))});
end
local ID_access_levels = extract_id_access_levels( args, ID_list );
local Quote = A['Quote'];
local LayFormat = A['LayFormat'];
local LayURL = A['LayURL'];
local LaySource = A['LaySource'];
local Transcript = A['Transcript'];
local TranscriptFormat = A['TranscriptFormat'];
local TranscriptURL = A['TranscriptURL']
local TranscriptURLorigin = A:ORIGIN('TranscriptURL'); -- get name of parameter that holds TranscriptURL
local LastAuthorAmp = is_valid_parameter_value (A['LastAuthorAmp'], A:ORIGIN('LastAuthorAmp'), cfg.keywords_lists['yes_true_y'], nil);
local no_tracking_cats = is_valid_parameter_value (A['NoTracking'], A:ORIGIN('NoTracking'), cfg.keywords_lists['yes_true_y'], nil);
--local variables that are not cs1 parameters
local use_lowercase; -- controls capitalization of certain static text
local this_page = mw.title.getCurrentTitle(); -- also used for COinS and for language
local anchor_year; -- used in the CITEREF identifier
local COinS_date = {}; -- holds date info extracted from |date= for the COinS metadata by Module:Date verification
local DF = is_valid_parameter_value (A['DF'], A:ORIGIN('DF'), cfg.keywords_lists['df'], '');
if not is_set (DF) then
DF = cfg.global_df; -- local df if present overrides global df set by {{use xxx date}} template
end
local sepc; -- separator between citation elements for CS1 a period, for CS2, a comma
local PostScript;
local Ref;
sepc, PostScript, Ref = set_style (Mode:lower(), A['PostScript'], A['Ref'], config.CitationClass);
use_lowercase = ( sepc == ',' ); -- used to control capitalization for certain static text
--check this page to see if it is in one of the namespaces that cs1 is not supposed to add to the error categories
if not is_set (no_tracking_cats) then -- ignore if we are already not going to categorize this page
if in_array (this_page.nsText, cfg.uncategorized_namespaces) then
no_tracking_cats = "true"; -- set no_tracking_cats
end
for _,v in ipairs (cfg.uncategorized_subpages) do -- cycle through page name patterns
if this_page.text:match (v) then -- test page name against each pattern
no_tracking_cats = "true"; -- set no_tracking_cats
break; -- bail out if one is found
end
end
end
-- check for extra |page=, |pages= or |at= parameters. (also sheet and sheets while we're at it)
select_one( args, {'page', 'p', 'pp', 'pages', 'at', 'sheet', 'sheets'}, 'redundant_parameters' ); -- this is a dummy call simply to get the error message and category
local coins_pages;
Page, Pages, At, coins_pages = insource_loc_get (Page, Pages, At);
local NoPP = is_valid_parameter_value (A['NoPP'], A:ORIGIN('NoPP'), cfg.keywords_lists['yes_true_y'], nil);
if is_set (PublicationPlace) and is_set (Place) then -- both |publication-place= and |place= (|location=) allowed if different
add_prop_cat ('location test'); -- add property cat to evaluate how often PublicationPlace and Place are used together
if PublicationPlace == Place then
Place = ''; -- unset; don't need both if they are the same
end
elseif not is_set (PublicationPlace) and is_set (Place) then -- when only |place= (|location=) is set ...
PublicationPlace = Place; -- promote |place= (|location=) to |publication-place
end
-- if not is_set(PublicationPlace) and is_set(Place) then -- both |publication-place= and |place= (|location=) allowed if different
-- PublicationPlace = Place; -- promote |place= (|location=) to |publication-place
-- end
--
if PublicationPlace == Place then Place = ''; end -- don't need both if they are the same
--[[
Parameter remapping for cite encyclopedia:
When the citation has these parameters:
|encyclopedia and |title then map |title to |article and |encyclopedia to |title
|encyclopedia and |article then map |encyclopedia to |title
|trans-title maps to |trans-chapter when |title is re-mapped
|url maps to |chapterurl when |title is remapped
All other combinations of |encyclopedia, |title, and |article are not modified
]]
local Encyclopedia = A['Encyclopedia'];
if ( config.CitationClass == "encyclopaedia" ) or ( config.CitationClass == "citation" and is_set (Encyclopedia)) then -- test code for citation
if is_set (Periodical) then -- Periodical is set when |encyclopedia is set
if is_set(Title) or is_set (ScriptTitle) then
if not is_set(Chapter) then
Chapter = Title; -- |encyclopedia and |title are set so map |title to |article and |encyclopedia to |title
ScriptChapter = ScriptTitle;
ScriptChapterOrigin = A:ORIGIN('ScriptTitle')
TransChapter = TransTitle;
ChapterURL = URL;
ChapterUrlAccess = UrlAccess;
if not is_set (ChapterURL) and is_set (TitleLink) then
Chapter = make_wikilink (TitleLink, Chapter);
end
Title = Periodical;
ChapterFormat = Format;
Periodical = ''; -- redundant so unset
TransTitle = '';
URL = '';
Format = '';
TitleLink = '';
ScriptTitle = '';
end
elseif is_set (Chapter) then -- |title not set
Title = Periodical; -- |encyclopedia set and |article set so map |encyclopedia to |title
Periodical = ''; -- redundant so unset
end
end
end
-- Special case for cite techreport.
if (config.CitationClass == "techreport") then -- special case for cite techreport
if is_set(A['Number']) then -- cite techreport uses 'number', which other citations alias to 'issue'
if not is_set(ID) then -- can we use ID for the "number"?
ID = A['Number']; -- yes, use it
else -- ID has a value so emit error message
table.insert( z.message_tail, { set_error('redundant_parameters', {wrap_style ('parameter', 'id') .. ' and ' .. wrap_style ('parameter', 'number')}, true )});
end
end
end
-- special case for cite mailing list
if (config.CitationClass == "mailinglist") then
Periodical = A ['MailingList'];
elseif 'mailinglist' == Periodical_origin then
Periodical = ''; -- unset because mailing list is only used for cite mailing list
end
-- Account for the oddity that is {{cite conference}}, before generation of COinS data.
if 'conference' == config.CitationClass then
if is_set(BookTitle) then
Chapter = Title;
-- ChapterLink = TitleLink; -- |chapterlink= is deprecated
ChapterURL = URL;
ChapterUrlAccess = UrlAccess;
ChapterURLorigin = URLorigin;
URLorigin = '';
ChapterFormat = Format;
TransChapter = TransTitle;
Title = BookTitle;
Format = '';
-- TitleLink = '';
TransTitle = '';
URL = '';
end
elseif 'speech' ~= config.CitationClass then
Conference = ''; -- not cite conference or cite speech so make sure this is empty string
end
-- cite map oddities
local Cartography = "";
local Scale = "";
local Sheet = A['Sheet'] or '';
local Sheets = A['Sheets'] or '';
if config.CitationClass == "map" then
Chapter = A['Map'];
ChapterURL = A['MapURL'];
ChapterURLorigin = A:ORIGIN('MapURL');
TransChapter = A['TransMap'];
ScriptChapter = A['ScriptMap']
ScriptChapterOrigin = A:ORIGIN('ScriptMap')
ChapterUrlAccess = MapUrlAccess;
ChapterFormat = A['MapFormat'];
Cartography = A['Cartography'];
if is_set( Cartography ) then
Cartography = sepc .. " " .. wrap_msg ('cartography', Cartography, use_lowercase);
end
Scale = A['Scale'];
if is_set( Scale ) then
Scale = sepc .. " " .. Scale;
end
end
-- Account for the oddities that are {{cite episode}} and {{cite serial}}, before generation of COinS data.
if 'episode' == config.CitationClass or 'serial' == config.CitationClass then
local AirDate = A['AirDate'];
local SeriesLink = A['SeriesLink'];
link_title_ok (SeriesLink, A:ORIGIN ('SeriesLink'), Series, 'series'); -- check for wikimarkup in |series-link= or wikimarkup in |series= when |series-link= is set
local Network = A['Network'];
local Station = A['Station'];
local s, n = {}, {};
-- do common parameters first
if is_set(Network) then table.insert(n, Network); end
if is_set(Station) then table.insert(n, Station); end
ID = table.concat(n, sepc .. ' ');
if not is_set (Date) and is_set (AirDate) then -- promote airdate to date
Date = AirDate;
end
if 'episode' == config.CitationClass then -- handle the oddities that are strictly {{cite episode}}
local Season = A['Season'];
local SeriesNumber = A['SeriesNumber'];
if is_set (Season) and is_set (SeriesNumber) then -- these are mutually exclusive so if both are set
table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'season') .. ' and ' .. wrap_style ('parameter', 'seriesno')}, true ) } ); -- add error message
SeriesNumber = ''; -- unset; prefer |season= over |seriesno=
end
-- assemble a table of parts concatenated later into Series
if is_set(Season) then table.insert(s, wrap_msg ('season', Season, use_lowercase)); end
if is_set(SeriesNumber) then table.insert(s, wrap_msg ('seriesnum', SeriesNumber, use_lowercase)); end
if is_set(Issue) then table.insert(s, wrap_msg ('episode', Issue, use_lowercase)); end
Issue = ''; -- unset because this is not a unique parameter
Chapter = Title; -- promote title parameters to chapter
ScriptChapter = ScriptTitle;
-- ScriptChapterOrigin = 'title';
ScriptChapterOrigin = A:ORIGIN('ScriptTitle');
ChapterLink = TitleLink; -- alias episodelink
TransChapter = TransTitle;
ChapterURL = URL;
ChapterUrlAccess = UrlAccess;
ChapterURLorigin = A:ORIGIN('URL');
Title = Series; -- promote series to title
TitleLink = SeriesLink;
Series = table.concat(s, sepc .. ' '); -- this is concatenation of season, seriesno, episode number
if is_set (ChapterLink) and not is_set (ChapterURL) then -- link but not URL
Chapter = make_wikilink (ChapterLink, Chapter);
elseif is_set (ChapterLink) and is_set (ChapterURL) then -- if both are set, URL links episode;
Series = make_wikilink (ChapterLink, Series);
end
URL = ''; -- unset
TransTitle = '';
ScriptTitle = '';
else -- now oddities that are cite serial
Issue = ''; -- unset because this parameter no longer supported by the citation/core version of cite serial
Chapter = A['Episode']; -- TODO: make |episode= available to cite episode someday?
if is_set (Series) and is_set (SeriesLink) then
Series = make_wikilink (SeriesLink, Series);
end
Series = wrap_style ('italic-title', Series); -- series is italicized
end
end
-- end of {{cite episode}} stuff
-- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, {{cite ssrn}}, before generation of COinS data.
do
if in_array (config.CitationClass, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) then
if not is_set (ID_list[config.CitationClass:upper()]) then -- |arxiv= or |eprint= required for cite arxiv; |biorxiv= & |citeseerx= required for their templates
table.insert( z.message_tail, { set_error( config.CitationClass .. '_missing', {}, true ) } ); -- add error message
end
Periodical = ({['arxiv'] = 'arXiv', ['biorxiv'] = 'bioRxiv', ['citeseerx'] = 'CiteSeerX', ['ssrn'] = 'Social Science Research Network'})[config.CitationClass];
end
end
-- handle type parameter for those CS1 citations that have default values
if in_array(config.CitationClass, {"AV-media-notes", "interview", "mailinglist", "map", "podcast", "pressrelease", "report", "techreport", "thesis"}) then
TitleType = set_titletype (config.CitationClass, TitleType);
if is_set(Degree) and "Thesis" == TitleType then -- special case for cite thesis
TitleType = Degree .. ' ' .. cfg.title_types ['thesis']:lower();
end
end
if is_set(TitleType) then -- if type parameter is specified
TitleType = substitute( cfg.messages['type'], TitleType); -- display it in parentheses
-- TODO: Hack on TitleType to fix bunched parentheses problem
end
-- legacy: promote PublicationDate to Date if neither Date nor Year are set.
local Date_origin; -- to hold the name of parameter promoted to Date; required for date error messaging
if not is_set (Date) then
Date = Year; -- promote Year to Date
Year = nil; -- make nil so Year as empty string isn't used for CITEREF
if not is_set (Date) and is_set(PublicationDate) then -- use PublicationDate when |date= and |year= are not set
Date = PublicationDate; -- promote PublicationDate to Date
PublicationDate = ''; -- unset, no longer needed
Date_origin = A:ORIGIN('PublicationDate'); -- save the name of the promoted parameter
else
Date_origin = A:ORIGIN('Year'); -- save the name of the promoted parameter
end
else
Date_origin = A:ORIGIN('Date'); -- not a promotion; name required for error messaging
end
if PublicationDate == Date then PublicationDate = ''; end -- if PublicationDate is same as Date, don't display in rendered citation
--[[
Go test all of the date-holding parameters for valid MOS:DATE format and make sure that dates are real dates. This must be done before we do COinS because here is where
we get the date used in the metadata.
Date validation supporting code is in Module:Citation/CS1/Date_validation
]]
do -- create defined block to contain local variables error_message, date_parameters_list, mismatch
local error_message = '';
-- AirDate has been promoted to Date so not necessary to check it
local date_parameters_list = {
['access-date'] = {val=AccessDate, name=A:ORIGIN ('AccessDate')},
['archive-date'] = {val=ArchiveDate, name=A:ORIGIN ('ArchiveDate')},
['date'] = {val=Date, name=Date_origin},
['doi-broken-date'] = {val=DoiBroken, name=A:ORIGIN ('DoiBroken')},
['embargo'] = {val=Embargo, name=A:ORIGIN ('Embargo')},
['lay-date'] = {val=LayDate, name=A:ORIGIN ('LayDate')},
['publication-date'] ={val=PublicationDate, name=A:ORIGIN ('PublicationDate')},
['year'] = {val=Year, name=A:ORIGIN ('Year')},
};
anchor_year, Embargo, error_message = dates(date_parameters_list, COinS_date);
-- start temporary Julian / Gregorian calendar uncertainty categorization
if COinS_date.inter_cal_cat then
add_prop_cat ('jul_greg_uncertainty');
end
-- end temporary Julian / Gregorian calendar uncertainty categorization
if is_set (Year) and is_set (Date) then -- both |date= and |year= not normally needed;
local mismatch = year_date_check (Year, Date)
if 0 == mismatch then -- |year= does not match a year-value in |date=
if is_set (error_message) then -- if there is already an error message
error_message = error_message .. ', '; -- tack on this additional message
end
error_message = error_message .. '|year= / |date= mismatch';
elseif 1 == mismatch then -- |year= matches year-value in |date=
add_maint_cat ('date_year');
end
end
if not is_set(error_message) then -- error free dates only
local modified = false; -- flag
if is_set (DF) then -- if we need to reformat dates
modified = reformat_dates (date_parameters_list, DF, false); -- reformat to DF format, use long month names if appropriate
end
if true == date_hyphen_to_dash (date_parameters_list) then -- convert hyphens to dashes where appropriate
modified = true;
add_maint_cat ('date_format'); -- hyphens were converted so add maint category
end
-- for those wikis that can and want to have English date names translated to the local language,
-- uncomment these three lines. Not supported by en.wiki (for obvious reasons)
-- set date_name_xlate() second argument to true to translate English digits to local digits (will translate ymd dates)
-- if date_name_xlate (date_parameters_list, false) then
-- modified = true;
-- end
if modified then -- if the date_parameters_list values were modified
AccessDate = date_parameters_list['access-date'].val; -- overwrite date holding parameters with modified values
ArchiveDate = date_parameters_list['archive-date'].val;
Date = date_parameters_list['date'].val;
DoiBroken = date_parameters_list['doi-broken-date'].val;
LayDate = date_parameters_list['lay-date'].val;
PublicationDate = date_parameters_list['publication-date'].val;
end
else
table.insert( z.message_tail, { set_error( 'bad_date', {error_message}, true ) } ); -- add this error message
end
end -- end of do
-- Account for the oddity that is {{cite journal}} with |pmc= set and |url= not set. Do this after date check but before COInS.
-- Here we unset Embargo if PMC not embargoed (|embargo= not set in the citation) or if the embargo time has expired. Otherwise, holds embargo date
Embargo = is_embargoed (Embargo);
if config.CitationClass == "journal" and not is_set(URL) and is_set(ID_list['PMC']) then
if not is_set (Embargo) then -- if not embargoed or embargo has expired
URL=cfg.id_handlers['PMC'].prefix .. ID_list['PMC']; -- set url to be the same as the PMC external link if not embargoed
URLorigin = cfg.id_handlers['PMC'].parameters[1]; -- set URLorigin to parameter name for use in error message if citation is missing a |title=
if is_set(AccessDate) then -- access date requires |url=; pmc created url is not |url=
table.insert( z.message_tail, { set_error( 'accessdate_missing_url', {}, true ) } );
AccessDate = ''; -- unset
end
end
end
-- At this point fields may be nil if they weren't specified in the template use. We can use that fact.
-- Test if citation has no title
if not is_set(Title) and
not is_set(TransTitle) and
not is_set(ScriptTitle) then
if 'episode' == config.CitationClass then -- special case for cite episode; TODO: is there a better way to do this?
table.insert( z.message_tail, { set_error( 'citation_missing_title', {'series'}, true ) } );
else
table.insert( z.message_tail, { set_error( 'citation_missing_title', {'title'}, true ) } );
end
end
if 'none' == Title and
in_array (config.CitationClass, {'journal', 'citation'}) and
(is_set (Periodical) or is_set (ScriptPeriodical)) and
('journal' == Periodical_origin or 'script-journal' == ScriptPeriodical_origin) then -- special case for journal cites
Title = ''; -- set title to empty string
add_maint_cat ('untitled');
end
check_for_url ({ -- add error message when any of these parameters hold a URL
['title']=Title,
[A:ORIGIN('Chapter')]=Chapter,
[Periodical_origin] = Periodical,
[PublisherName_origin] = PublisherName
});
-- COinS metadata (see <http://ocoins.info/>) for automated parsing of citation information.
-- handle the oddity that is cite encyclopedia and {{citation |encyclopedia=something}}. Here we presume that
-- when Periodical, Title, and Chapter are all set, then Periodical is the book (encyclopedia) title, Title
-- is the article title, and Chapter is a section within the article. So, we remap
local coins_chapter = Chapter; -- default assuming that remapping not required
local coins_title = Title; -- et tu
if 'encyclopaedia' == config.CitationClass or ('citation' == config.CitationClass and is_set (Encyclopedia)) then
if is_set (Chapter) and is_set (Title) and is_set (Periodical) then -- if all are used then
coins_chapter = Title; -- remap
coins_title = Periodical;
end
end
local coins_author = a; -- default for coins rft.au
if 0 < #c then -- but if contributor list
coins_author = c; -- use that instead
end
-- this is the function call to COinS()
local OCinSoutput = COinS({
['Periodical'] = strip_apostrophe_markup (Periodical), -- no markup in the metadata
['Encyclopedia'] = strip_apostrophe_markup (Encyclopedia),
['Chapter'] = make_coins_title (coins_chapter, ScriptChapter), -- Chapter and ScriptChapter stripped of bold / italic wikimarkup
['Degree'] = Degree; -- cite thesis only
['Title'] = make_coins_title (coins_title, ScriptTitle), -- Title and ScriptTitle stripped of bold / italic wikimarkup
['PublicationPlace'] = PublicationPlace,
['Date'] = COinS_date.rftdate, -- COinS_date has correctly formatted date if Date is valid;
['Season'] = COinS_date.rftssn,
['Chron'] = COinS_date.rftchron or (not COinS_date.rftdate and Date) or '', -- chron but if not set and invalid date format use Date; keep this last bit?
['Series'] = Series,
['Volume'] = Volume,
['Issue'] = Issue,
['Pages'] = coins_pages or get_coins_pages (first_set ({Sheet, Sheets, Page, Pages, At}, 5)), -- pages stripped of external links
['Edition'] = Edition,
['PublisherName'] = PublisherName, -- any apostrophe markup already removed
['URL'] = first_set ({ChapterURL, URL}, 2),
['Authors'] = coins_author,
['ID_list'] = ID_list,
['RawPage'] = this_page.prefixedText,
}, config.CitationClass);
-- Account for the oddities that are {{cite arxiv}}, {{cite biorxiv}}, {{cite citeseerx}}, and {{cite ssrn}} AFTER generation of COinS data.
if in_array (config.CitationClass, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) then -- we have set rft.jtitle in COinS to arXiv, bioRxiv, CiteSeerX, or ssrn now unset so it isn't displayed
Periodical = ''; -- periodical not allowed in these templates; if article has been published, use cite journal
end
-- special case for cite newsgroup. Do this after COinS because we are modifying Publishername to include some static text
if 'newsgroup' == config.CitationClass then
if is_set (PublisherName) then
PublisherName = substitute (cfg.messages['newsgroup'], external_link( 'news:' .. PublisherName, PublisherName, PublisherName_origin, nil ));
end
end
-- Now perform various field substitutions.
-- We also add leading spaces and surrounding markup and punctuation to the
-- various parts of the citation, but only when they are non-nil.
local EditorCount; -- used only for choosing {ed.) or (eds.) annotation at end of editor name-list
do
local last_first_list;
local control = {
format = NameListFormat, -- empty string or 'vanc'
maximum = nil, -- as if display-authors or display-editors not set
lastauthoramp = LastAuthorAmp,
page_name = this_page.text, -- get current page name so that we don't wikilink to it via editorlinkn
mode = Mode
};
do -- do editor name list first because the now unsupported coauthors used to modify control table
control.maximum , editor_etal = get_display_names (A['DisplayEditors'], #e, 'editors', editor_etal);
last_first_list, EditorCount = list_people(control, e, editor_etal);
if is_set (Editors) then
Editors, editor_etal = name_has_etal (Editors, editor_etal, false, 'editors'); -- find and remove variations on et al.
if editor_etal then
Editors = Editors .. ' ' .. cfg.messages['et al']; -- add et al. to editors parameter beause |display-editors=etal
EditorCount = 2; -- with et al., |editors= is multiple names; spoof to display (eds.) annotation
else
EditorCount = 2; -- we don't know but assume |editors= is multiple names; spoof to display (eds.) annotation
end
else
Editors = last_first_list; -- either an author name list or an empty string
end
if 1 == EditorCount and (true == editor_etal or 1 < #e) then -- only one editor displayed but includes etal then
EditorCount = 2; -- spoof to display (eds.) annotation
end
end
do -- now do interviewers
control.maximum , interviewer_etal = get_display_names (A['DisplayInterviewers'], #interviewers_list, 'interviewers', interviewer_etal);
Interviewers = list_people (control, interviewers_list, interviewer_etal);
end
do -- now do translators
control.maximum , translator_etal = get_display_names (A['DisplayTranslators'], #t, 'translators', translator_etal);
Translators = list_people (control, t, translator_etal);
end
do -- now do contributors
control.maximum , contributor_etal = get_display_names (A['DisplayContributors'], #c, 'contributors', contributor_etal);
Contributors = list_people (control, c, contributor_etal);
end
do -- now do authors
control.maximum , author_etal = get_display_names (A['DisplayAuthors'], #a, 'authors', author_etal);
last_first_list = list_people(control, a, author_etal);
if is_set (Authors) then
Authors, author_etal = name_has_etal (Authors, author_etal, false, 'authors'); -- find and remove variations on et al.
if author_etal then
Authors = Authors .. ' ' .. cfg.messages['et al']; -- add et al. to authors parameter
end
else
Authors = last_first_list; -- either an author name list or an empty string
end
end -- end of do
if is_set (Authors) and is_set (Collaboration) then
Authors = Authors .. ' (' .. Collaboration .. ')'; -- add collaboration after et al.
end
end
-- apply |[xx-]format= styling; at the end, these parameters hold correctly styled format annotation,
-- an error message if the associated url is not set, or an empty string for concatenation
ArchiveFormat = style_format (ArchiveFormat, ArchiveURL, 'archive-format', 'archive-url');
ConferenceFormat = style_format (ConferenceFormat, ConferenceURL, 'conference-format', 'conference-url');
Format = style_format (Format, URL, 'format', 'url');
LayFormat = style_format (LayFormat, LayURL, 'lay-format', 'lay-url');
TranscriptFormat = style_format (TranscriptFormat, TranscriptURL, 'transcript-format', 'transcripturl');
-- special case for chapter format so no error message or cat when chapter not supported
if not (in_array(config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or
('citation' == config.CitationClass and (is_set (Periodical) or is_set (ScriptPeriodical)) and not is_set (Encyclopedia))) then
ChapterFormat = style_format (ChapterFormat, ChapterURL, 'chapter-format', 'chapter-url');
end
if not is_set(URL) then
if in_array(config.CitationClass, {"web","podcast", "mailinglist"}) or -- |url= required for cite web, cite podcast, and cite mailinglist
('citation' == config.CitationClass and ('website' == Periodical_origin or 'script-website' == ScriptPeriodical_origin)) then -- and required for {{citation}} with |website= or |script-website=
table.insert( z.message_tail, { set_error( 'cite_web_url', {}, true ) } );
end
-- do we have |accessdate= without either |url= or |chapter-url=?
if is_set(AccessDate) and not is_set(ChapterURL)then -- ChapterURL may be set when URL is not set;
table.insert( z.message_tail, { set_error( 'accessdate_missing_url', {}, true ) } );
AccessDate = '';
end
end
local OriginalURL, OriginalURLorigin, OriginalFormat, OriginalAccess;
UrlStatus = UrlStatus:lower(); -- used later when assembling archived text
if is_set( ArchiveURL ) then
if is_set (ChapterURL) then -- if chapter-url is set apply archive url to it
OriginalURL = ChapterURL; -- save copy of source chapter's url for archive text
OriginalURLorigin = ChapterURLorigin; -- name of chapter-url parameter for error messages
OriginalFormat = ChapterFormat; -- and original |chapter-format=
if 'live' ~= UrlStatus then
ChapterURL = ArchiveURL -- swap-in the archive's url
ChapterURLorigin = A:ORIGIN('ArchiveURL') -- name of archive-url parameter for error messages
ChapterFormat = ArchiveFormat or ''; -- swap in archive's format
ChapterUrlAccess = nil; -- restricted access levels do not make sense for archived urls
end
elseif is_set (URL) then
OriginalURL = URL; -- save copy of original source URL
OriginalURLorigin = URLorigin; -- name of url parameter for error messages
OriginalFormat = Format; -- and original |format=
OriginalAccess = UrlAccess;
if 'live' ~= UrlStatus then -- if URL set then archive-url applies to it
URL = ArchiveURL -- swap-in the archive's url
URLorigin = A:ORIGIN('ArchiveURL') -- name of archive url parameter for error messages
Format = ArchiveFormat or ''; -- swap in archive's format
UrlAccess = nil; -- restricted access levels do not make sense for archived urls
end
end
end
if in_array(config.CitationClass, {'web','news','journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or -- if any of the 'periodical' cites except encyclopedia
('citation' == config.CitationClass and (is_set (Periodical) or is_set (ScriptPeriodical)) and not is_set (Encyclopedia)) then
local chap_param;
if is_set (Chapter) then -- get a parameter name from one of these chapter related meta-parameters
chap_param = A:ORIGIN ('Chapter')
elseif is_set (TransChapter) then
chap_param = A:ORIGIN ('TransChapter')
elseif is_set (ChapterURL) then
chap_param = A:ORIGIN ('ChapterURL')
elseif is_set (ScriptChapter) then
chap_param = ScriptChapterOrigin;
else is_set (ChapterFormat)
chap_param = A:ORIGIN ('ChapterFormat')
end
if is_set (chap_param) then -- if we found one
table.insert( z.message_tail, { set_error( 'chapter_ignored', {chap_param}, true ) } ); -- add error message
Chapter = ''; -- and set them to empty string to be safe with concatenation
TransChapter = '';
ChapterURL = '';
ScriptChapter = '';
ChapterFormat = '';
end
else -- otherwise, format chapter / article title
local no_quotes = false; -- default assume that we will be quoting the chapter parameter value
if is_set (Contribution) and 0 < #c then -- if this is a contribution with contributor(s)
if in_array (Contribution:lower(), cfg.keywords_lists.contribution) then -- and a generic contribution title
no_quotes = true; -- then render it unquoted
end
end
Chapter = format_chapter_title (ScriptChapter, ScriptChapterOrigin, Chapter, TransChapter, ChapterURL, ChapterURLorigin, no_quotes, ChapterUrlAccess); -- Contribution is also in Chapter
if is_set (Chapter) then
Chapter = Chapter .. ChapterFormat ;
if 'map' == config.CitationClass and is_set (TitleType) then
Chapter = Chapter .. ' ' .. TitleType; -- map annotation here; not after title
end
Chapter = Chapter.. sepc .. ' ';
elseif is_set (ChapterFormat) then -- |chapter= not set but |chapter-format= is so ...
Chapter = ChapterFormat .. sepc .. ' '; -- ... ChapterFormat has error message, we want to see it
end
end
-- Format main title.
if is_set (ArchiveURL) and mw.ustring.match (mw.ustring.lower(Title), cfg.special_case_translation['archived_copy']) then -- if title is 'Archived copy' (place holder added by bots that can't find proper title)
add_maint_cat ('archived_copy'); -- add maintenance category before we modify the content of Title
end
if Title:match ('^%(%(.*%)%)$') then -- if keep as written markup:
Title= Title:gsub ('^%(%((.*)%)%)$', '%1') -- remove the markup
else
if '...' == Title:sub (-3) then -- if elipsis is the last three characters of |title=
Title = Title:gsub ('(%.%.%.)%.+$', '%1'); -- limit the number of dots to three
elseif not mw.ustring.find (Title, '%.%s*%a%.$') and -- end of title is not a 'dot-(optional space-)letter-dot' initialism ...
not mw.ustring.find (Title, '%s+%a%.$') then -- ...and not a 'space-letter-dot' initial (''Allium canadense'' L.)
Title = mw.ustring.gsub(Title, '%'..sepc..'$', ''); -- remove any trailing separator character; sepc and ms.ustring() here for languages that use multibyte separator characters
end
end
if in_array(config.CitationClass, {'web', 'news', 'journal', 'magazine', 'pressrelease', 'podcast', 'newsgroup', 'mailinglist', 'interview', 'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) or
('citation' == config.CitationClass and (is_set (Periodical) or is_set (ScriptPeriodical)) and not is_set (Encyclopedia)) or
('map' == config.CitationClass and (is_set (Periodical) or is_set (ScriptPeriodical))) then -- special case for cite map when the map is in a periodical treat as an article
Title = kern_quotes (Title); -- if necessary, separate title's leading and trailing quote marks from Module provided quote marks
Title = wrap_style ('quoted-title', Title);
Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped
TransTitle= wrap_style ('trans-quoted-title', TransTitle );
elseif 'report' == config.CitationClass then -- no styling for cite report
Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped
TransTitle= wrap_style ('trans-quoted-title', TransTitle ); -- for cite report, use this form for trans-title
else
Title = wrap_style ('italic-title', Title);
Title = script_concatenate (Title, ScriptTitle, 'script-title'); -- <bdi> tags, lang atribute, categorization, etc; must be done after title is wrapped
TransTitle = wrap_style ('trans-italic-title', TransTitle);
end
local TransError = "";
if is_set(TransTitle) then
if is_set(Title) then
TransTitle = " " .. TransTitle;
else
TransError = " " .. set_error( 'trans_missing_title', {'title'} );
end
end
if is_set(Title) then
if not is_set (TitleLink) and is_set (URL) then
Title = external_link (URL, Title, URLorigin, UrlAccess) .. TransTitle .. TransError .. Format;
URL = ''; -- unset these because no longer needed
Format = "";
elseif is_set (TitleLink) and not is_set (URL) then
local ws_url;
ws_url = wikisource_url_make (TitleLink); -- ignore ws_label return; not used here
if ws_url then
Title = external_link (ws_url, Title .. ' ', 'ws link in title-link'); -- space char after Title to move icon away from italic text; TODO: a better way to do this?
Title = substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], TitleLink, Title});
Title = Title .. TransTitle .. TransError;
else
Title = make_wikilink (TitleLink, Title) .. TransTitle .. TransError;
end
else
local ws_url, ws_label;
ws_url, ws_label, L = wikisource_url_make (Title); -- make ws url from |title= interwiki link; link portion L becomes tool tip label
if ws_url then
Title = Title:gsub ('%b[]', ws_label); -- replace interwiki link with ws_label to retain markup
Title = external_link (ws_url, Title .. ' ', 'ws link in title'); -- space char after Title to move icon away from italic text; TODO: a better way to do this?
Title = substitute (cfg.presentation['interwiki-icon'], {cfg.presentation['class-wikisource'], L, Title});
Title = Title .. TransTitle .. TransError;
else
Title = Title .. TransTitle .. TransError;
end
end
else
Title = TransTitle .. TransError;
end
if is_set(Place) then
Place = " " .. wrap_msg ('written', Place, use_lowercase) .. sepc .. " ";
end
if is_set (Conference) then
if is_set (ConferenceURL) then
Conference = external_link( ConferenceURL, Conference, ConferenceURLorigin, nil );
end
Conference = sepc .. " " .. Conference .. ConferenceFormat;
elseif is_set(ConferenceURL) then
Conference = sepc .. " " .. external_link( ConferenceURL, nil, ConferenceURLorigin, nil );
end
if not is_set(Position) then
local Minutes = A['Minutes'];
local Time = A['Time'];
if is_set(Minutes) then
if is_set (Time) then
table.insert( z.message_tail, { set_error( 'redundant_parameters', {wrap_style ('parameter', 'minutes') .. ' and ' .. wrap_style ('parameter', 'time')}, true ) } );
end
Position = " " .. Minutes .. " " .. cfg.messages['minutes'];
else
if is_set(Time) then
local TimeCaption = A['TimeCaption']
if not is_set(TimeCaption) then
TimeCaption = cfg.messages['event'];
if sepc ~= '.' then
TimeCaption = TimeCaption:lower();
end
end
Position = " " .. TimeCaption .. " " .. Time;
end
end
else
Position = " " .. Position;
At = '';
end
Page, Pages, Sheet, Sheets = format_pages_sheets (Page, Pages, Sheet, Sheets, config.CitationClass, Periodical_origin, sepc, NoPP, use_lowercase);
At = is_set(At) and (sepc .. " " .. At) or "";
Position = is_set(Position) and (sepc .. " " .. Position) or "";
if config.CitationClass == 'map' then
local Section = A['Section'];
local Sections = A['Sections'];
local Inset = A['Inset'];
if is_set( Inset ) then
Inset = sepc .. " " .. wrap_msg ('inset', Inset, use_lowercase);
end
if is_set( Sections ) then
Section = sepc .. " " .. wrap_msg ('sections', Sections, use_lowercase);
elseif is_set( Section ) then
Section = sepc .. " " .. wrap_msg ('section', Section, use_lowercase);
end
At = At .. Inset .. Section;
end
if is_set (Language) then
Language = language_parameter (Language); -- format, categories, name from ISO639-1, etc
else
Language=""; -- language not specified so make sure this is an empty string;
--[[ TODO: need to extract the wrap_msg from language_parameter
so that we can solve parentheses bunching problem with Format/Language/TitleType
]]
end
Others = is_set(Others) and (sepc .. " " .. Others) or "";
if is_set (Translators) then
Others = safe_join ({sepc .. ' ', wrap_msg ('translated', Translators, use_lowercase), Others}, sepc);
end
if is_set (Interviewers) then
Others = safe_join ({sepc .. ' ', wrap_msg ('interview', Interviewers, use_lowercase), Others}, sepc);
end
TitleNote = is_set(TitleNote) and (sepc .. " " .. TitleNote) or "";
if is_set (Edition) then
if Edition:match ('%f[%a][Ee]d%.?$') or Edition:match ('%f[%a][Ee]dition$') then
add_maint_cat ('extra_text', 'edition');
end
Edition = " " .. wrap_msg ('edition', Edition);
else
Edition = '';
end
Series = is_set (Series) and wrap_msg ('series', {sepc, Series}) or ""; -- not the same as SeriesNum
OrigYear = is_set (OrigYear) and wrap_msg ('origyear', OrigYear) or '';
Agency = is_set (Agency) and wrap_msg ('agency', {sepc, Agency}) or "";
Volume = format_volume_issue (Volume, Issue, config.CitationClass, Periodical_origin, sepc, use_lowercase);
------------------------------------ totally unrelated data
Via = is_set (Via) and wrap_msg ('via', Via) or '';
if is_set(AccessDate) then
local retrv_text = " " .. cfg.messages['retrieved']
AccessDate = nowrap_date (AccessDate); -- wrap in nowrap span if date in appropriate format
if (sepc ~= ".") then retrv_text = retrv_text:lower() end -- if mode is cs2, lower case
AccessDate = substitute (retrv_text, AccessDate); -- add retrieved text
AccessDate = substitute (cfg.presentation['accessdate'], {sepc, AccessDate}); -- allow editors to hide accessdates
end
if is_set(ID) then ID = sepc .." ".. ID; end
if "thesis" == config.CitationClass and is_set(Docket) then
ID = sepc .." Docket ".. Docket .. ID;
end
if "report" == config.CitationClass and is_set(Docket) then -- for cite report when |docket= is set
ID = sepc .. ' ' .. Docket; -- overwrite ID even if |id= is set
end
ID_list = build_id_list( ID_list, {IdAccessLevels=ID_access_levels, DoiBroken = DoiBroken, ASINTLD = ASINTLD, IgnoreISBN = IgnoreISBN, Embargo=Embargo, Class = Class} );
if is_set(URL) then
URL = " " .. external_link( URL, nil, URLorigin, UrlAccess );
end
if is_set(Quote) then
if Quote:sub(1,1) == '"' and Quote:sub(-1,-1) == '"' then -- if first and last characters of quote are quote marks
Quote = Quote:sub(2,-2); -- strip them off
end
Quote = sepc .." " .. wrap_style ('quoted-text', Quote ); -- wrap in <q>...</q> tags
PostScript = ""; -- cs1|2 does not supply terminal punctuation when |quote= is set
end
local Archived
if is_set(ArchiveURL) then
local arch_text;
if not is_set(ArchiveDate) then
ArchiveDate = set_error('archive_missing_date');
end
if "live" == UrlStatus then
arch_text = cfg.messages['archived'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. substitute( cfg.messages['archived-live'],
{ external_link( ArchiveURL, arch_text, A:ORIGIN('ArchiveURL'), nil ) .. ArchiveFormat, ArchiveDate } );
if not is_set (OriginalURL) then
Archived = Archived .. " " .. set_error('archive_missing_url');
end
elseif is_set(OriginalURL) then -- UrlStatus is empty, 'dead', 'unfit', 'usurped', 'bot: unknown'
if in_array (UrlStatus, {'unfit', 'usurped', 'bot: unknown'}) then
arch_text = cfg.messages['archived-unfit'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. arch_text .. ArchiveDate; -- format already styled
if 'bot: unknown' == UrlStatus then
add_maint_cat ('bot:_unknown'); -- and add a category if not already added
else
add_maint_cat ('unfit'); -- and add a category if not already added
end
else -- UrlStatus is empty, 'dead'
arch_text = cfg.messages['archived-dead'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. substitute( arch_text,
{ external_link( OriginalURL, cfg.messages['original'], OriginalURLorigin, OriginalAccess ) .. OriginalFormat, ArchiveDate } ); -- format already styled
end
else -- OriginalUrl not set
arch_text = cfg.messages['archived-missing'];
if sepc ~= "." then arch_text = arch_text:lower() end
Archived = sepc .. " " .. substitute( arch_text,
{ set_error('archive_missing_url'), ArchiveDate } );
end
elseif is_set (ArchiveFormat) then
Archived = ArchiveFormat; -- if set and ArchiveURL not set ArchiveFormat has error message
else
Archived = ""
end
local Lay = '';
if is_set(LayURL) then
if is_set(LayDate) then LayDate = " (" .. LayDate .. ")" end
if is_set(LaySource) then
LaySource = " – ''" .. safe_for_italics(LaySource) .. "''";
else
LaySource = "";
end
if sepc == '.' then
Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary'], A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate
else
Lay = sepc .. " " .. external_link( LayURL, cfg.messages['lay summary']:lower(), A:ORIGIN('LayURL'), nil ) .. LayFormat .. LaySource .. LayDate
end
elseif is_set (LayFormat) then -- Test if |lay-format= is given without giving a |lay-url=
Lay = sepc .. LayFormat; -- if set and LayURL not set, then LayFormat has error message
end
if is_set(Transcript) then
if is_set(TranscriptURL) then
Transcript = external_link( TranscriptURL, Transcript, TranscriptURLorigin, nil );
end
Transcript = sepc .. ' ' .. Transcript .. TranscriptFormat;
elseif is_set(TranscriptURL) then
Transcript = external_link( TranscriptURL, nil, TranscriptURLorigin, nil );
end
local Publisher;
if is_set(PublicationDate) then
PublicationDate = wrap_msg ('published', PublicationDate);
end
if is_set(PublisherName) then
if is_set(PublicationPlace) then
Publisher = sepc .. " " .. PublicationPlace .. ": " .. PublisherName .. PublicationDate;
else
Publisher = sepc .. " " .. PublisherName .. PublicationDate;
end
elseif is_set(PublicationPlace) then
Publisher= sepc .. " " .. PublicationPlace .. PublicationDate;
else
Publisher = PublicationDate;
end
-- Several of the above rely upon detecting this as nil, so do it last.
if (is_set (Periodical) or is_set (ScriptPeriodical) or is_set (TransPeriodical)) then
if is_set(Title) or is_set(TitleNote) then
Periodical = sepc .. " " .. format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical);
else
Periodical = format_periodical (ScriptPeriodical, ScriptPeriodical_origin, Periodical, TransPeriodical);
end
end
--[[
Handle the oddity that is cite speech. This code overrides whatever may be the value assigned to TitleNote (through |department=) and forces it to be " (Speech)" so that
the annotation directly follows the |title= parameter value in the citation rather than the |event= parameter value (if provided).
]]
if "speech" == config.CitationClass then -- cite speech only
TitleNote = " (Speech)"; -- annotate the citation
if is_set (Periodical) then -- if Periodical, perhaps because of an included |website= or |journal= parameter
if is_set (Conference) then -- and if |event= is set
Conference = Conference .. sepc .. " "; -- then add appropriate punctuation to the end of the Conference variable before rendering
end
end
end
-- Piece all bits together at last. Here, all should be non-nil.
-- We build things this way because it is more efficient in LUA
-- not to keep reassigning to the same string variable over and over.
local tcommon;
local tcommon2; -- used for book cite when |contributor= is set
if in_array(config.CitationClass, {"journal","citation"}) and is_set(Periodical) then
if is_set(Others) then Others = safe_join ({Others, sepc .. " "}, sepc) end -- add terminal punctuation & space; check for dup sepc; TODO why do we need to do this here?
tcommon = safe_join( {Others, Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Edition, Publisher, Agency, Volume}, sepc );
elseif in_array(config.CitationClass, {"book","citation"}) and not is_set(Periodical) then -- special cases for book cites
if is_set (Contributors) then -- when we are citing foreword, preface, introduction, etc
tcommon = safe_join( {Title, TitleNote}, sepc ); -- author and other stuff will come after this and before tcommon2
tcommon2 = safe_join( {Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc );
else
tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language, Volume, Others, Edition, Publisher, Agency}, sepc );
end
elseif 'map' == config.CitationClass then -- special cases for cite map
if is_set (Chapter) then -- map in a book; TitleType is part of Chapter
tcommon = safe_join( {Title, Format, Edition, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc );
elseif is_set (Periodical) then -- map in a periodical
tcommon = safe_join( {Title, TitleType, Format, Periodical, Scale, Series, Language, Cartography, Others, Publisher, Volume}, sepc );
else -- a sheet or stand-alone map
tcommon = safe_join( {Title, TitleType, Format, Edition, Scale, Series, Language, Cartography, Others, Publisher}, sepc );
end
elseif 'episode' == config.CitationClass then -- special case for cite episode
tcommon = safe_join( {Title, TitleNote, TitleType, Series, Language, Edition, Publisher}, sepc );
else -- all other CS1 templates
tcommon = safe_join( {Title, TitleNote, Conference, Periodical, Format, TitleType, Series, Language,
Volume, Others, Edition, Publisher, Agency}, sepc );
end
if #ID_list > 0 then
ID_list = safe_join( { sepc .. " ", table.concat( ID_list, sepc .. " " ), ID }, sepc );
else
ID_list = ID;
end
local idcommon;
if 'audio-visual' == config.CitationClass or 'episode' == config.CitationClass then -- special case for cite AV media & cite episode position transcript
idcommon = safe_join( { ID_list, URL, Archived, Transcript, AccessDate, Via, Lay, Quote }, sepc );
else
idcommon = safe_join( { ID_list, URL, Archived, AccessDate, Via, Lay, Quote }, sepc );
end
local text;
local pgtext = Position .. Sheet .. Sheets .. Page .. Pages .. At;
if is_set(Date) then
if is_set (Authors) or is_set (Editors) then -- date follows authors or editors when authors not set
Date = " (" .. Date ..")" .. OrigYear .. sepc .. " "; -- in paranetheses
else -- neither of authors and editors set
if (string.sub(tcommon,-1,-1) == sepc) then -- if the last character of tcommon is sepc
Date = " " .. Date .. OrigYear; -- Date does not begin with sepc
else
Date = sepc .. " " .. Date .. OrigYear; -- Date begins with sepc
end
end
end
if is_set(Authors) then
if (not is_set (Date)) then -- when date is set it's in parentheses; no Authors termination
Authors = terminate_name_list (Authors, sepc); -- when no date, terminate with 0 or 1 sepc and a space
end
if is_set(Editors) then
local in_text = " ";
local post_text = "";
if is_set(Chapter) and 0 == #c then
in_text = in_text .. cfg.messages['in'] .. " "
if (sepc ~= '.') then
in_text = in_text:lower() -- lowercase for cs2
end
end
if EditorCount <= 1 then
post_text = " (" .. cfg.messages['editor'] .. ")"; -- be consistent with no-author, no-date case
else
post_text = " (" .. cfg.messages['editors'] .. ")";
end
Editors = terminate_name_list (in_text .. Editors .. post_text, sepc); -- terminate with 0 or 1 sepc and a space
end
if is_set (Contributors) then -- book cite and we're citing the intro, preface, etc
local by_text = sepc .. ' ' .. cfg.messages['by'] .. ' ';
if (sepc ~= '.') then by_text = by_text:lower() end -- lowercase for cs2
Authors = by_text .. Authors; -- author follows title so tweak it here
if is_set (Editors) and is_set (Date) then -- when Editors make sure that Authors gets terminated
Authors = terminate_name_list (Authors, sepc); -- terminate with 0 or 1 sepc and a space
end
if (not is_set (Date)) then -- when date is set it's in parentheses; no Contributors termination
Contributors = terminate_name_list (Contributors, sepc); -- terminate with 0 or 1 sepc and a space
end
text = safe_join( {Contributors, Date, Chapter, tcommon, Authors, Place, Editors, tcommon2, pgtext, idcommon }, sepc );
else
text = safe_join( {Authors, Date, Chapter, Place, Editors, tcommon, pgtext, idcommon }, sepc );
end
elseif is_set(Editors) then
if is_set(Date) then
if EditorCount <= 1 then
Editors = Editors .. ", " .. cfg.messages['editor'];
else
Editors = Editors .. ", " .. cfg.messages['editors'];
end
else
if EditorCount <= 1 then
Editors = Editors .. " (" .. cfg.messages['editor'] .. ")" .. sepc .. " "
else
Editors = Editors .. " (" .. cfg.messages['editors'] .. ")" .. sepc .. " "
end
end
text = safe_join( {Editors, Date, Chapter, Place, tcommon, pgtext, idcommon}, sepc );
else
if in_array(config.CitationClass, {"journal","citation"}) and is_set(Periodical) then
text = safe_join( {Chapter, Place, tcommon, pgtext, Date, idcommon}, sepc );
else
text = safe_join( {Chapter, Place, tcommon, Date, pgtext, idcommon}, sepc );
end
end
if is_set(PostScript) and PostScript ~= sepc then
text = safe_join( {text, sepc}, sepc ); --Deals with italics, spaces, etc.
text = text:sub(1,-sepc:len()-1);
end
text = safe_join( {text, PostScript}, sepc );
-- Now enclose the whole thing in a <cite/> element
local options = {};
if is_set(config.CitationClass) and config.CitationClass ~= "citation" then
options.class = config.CitationClass;
options.class = "citation " .. config.CitationClass; -- class=citation required for blue highlight when used with |ref=
else
options.class = "citation";
end
if is_set(Ref) and Ref:lower() ~= "none" then -- set reference anchor if appropriate
local id = Ref
if ('harv' == Ref ) then
local namelist = {}; -- holds selected contributor, author, editor name list
local year = first_set ({Year, anchor_year}, 2); -- Year first for legacy citations and for YMD dates that require disambiguation
if #c > 0 then -- if there is a contributor list
namelist = c; -- select it
elseif #a > 0 then -- or an author list
namelist = a;
elseif #e > 0 then -- or an editor list
namelist = e;
end
if #namelist > 0 then -- if there are names in namelist
id = anchor_id (namelist, year); -- go make the CITEREF anchor
else
id = ''; -- unset
end
end
options.id = id;
end
if string.len(text:gsub("<span[^>/]*>(.-)</span>", "%1"):gsub("%b<>","")) <= 2 then -- remove <span> tags and other html-like markup; then get length of what remains
z.error_categories = {};
text = set_error('empty_citation');
z.message_tail = {};
end
local render = {}; -- here we collect the final bits for concatenation into the rendered citation
if is_set(options.id) then -- here we wrap the rendered citation in <cite ...>...</cite> tags
table.insert (render, substitute (cfg.presentation['cite-id'], {mw.uri.anchorEncode(options.id), mw.text.nowiki(options.class), text})); -- when |ref= is set
else
table.insert (render, substitute (cfg.presentation['cite'], {mw.text.nowiki(options.class), text})); -- all other cases
end
table.insert (render, substitute (cfg.presentation['ocins'], {OCinSoutput})); -- append metadata to the citation
if 0 ~= #z.message_tail then
table.insert (render, ' ');
for i,v in ipairs( z.message_tail ) do
if is_set(v[1]) then
if i == #z.message_tail then
table.insert (render, error_comment( v[1], v[2] ));
else
table.insert (render, error_comment( v[1] .. "; ", v[2] ));
end
end
end
end
if 0 ~= #z.maintenance_cats then
local maint_msgs = {}; -- here we collect all of the maint messages
for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories
local maint = {}; -- here we assemble a maintenence message
table.insert (maint, v); -- maint msg is the category name
table.insert (maint, ' ('); -- open the link text
table.insert (maint, make_wikilink (':Category:' .. v, 'link')); -- add the link
table.insert (maint, ')'); -- and close it
table.insert (maint_msgs, table.concat (maint)); -- assemble new maint message and add it to the maint_msgs table
end
table.insert (render, substitute (cfg.presentation['hidden-maint'], table.concat (maint_msgs, ' '))); -- wrap the group of maint message with proper presentation and save
end
-- no_tracking_cats = no_tracking_cats:lower();
-- if in_array(no_tracking_cats, {"", "no", "false", "n"}) then
if not no_tracking_cats then
for _, v in ipairs( z.error_categories ) do
table.insert (render, make_wikilink ('Category:' .. v));
end
for _, v in ipairs( z.maintenance_cats ) do -- append maintenance categories
table.insert (render, make_wikilink ('Category:' .. v));
end
for _, v in ipairs( z.properties_cats ) do -- append properties categories
table.insert (render, make_wikilink ('Category:' .. v));
end
end
return table.concat (render);
end
--[[--------------------------< V A L I D A T E >--------------------------------------------------------------
Looks for a parameter's name in one of several whitelists.
Parameters in the whitelist can have three values:
true - active, supported parameters
false - deprecated, supported parameters
nil - unsupported parameters
]]
local function validate (name, cite_class)
local name = tostring (name);
local state;
if in_array (cite_class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) then -- limited parameter sets allowed for these templates
state = whitelist.limited_basic_arguments[name];
if true == state then return true; end -- valid actively supported parameter
if false == state then
deprecated_parameter (name); -- parameter is deprecated but still supported
return true;
end
state = whitelist[cite_class .. '_basic_arguments'][name]; -- look in the parameter-list for the template identified by cite_class
if true == state then return true; end -- valid actively supported parameter
if false == state then
deprecated_parameter (name); -- parameter is deprecated but still supported
return true;
end
-- limited enumerated parameters list
name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits)
state = whitelist.limited_numbered_arguments[name];
if true == state then return true; end -- valid actively supported parameter
if false == state then
deprecated_parameter (name); -- parameter is deprecated but still supported
return true;
end
return false; -- not supported because not found or name is set to nil
end -- end limited parameter-set templates
state = whitelist.basic_arguments[name]; -- all other templates; all normal parameters allowed
if true == state then return true; end -- valid actively supported parameter
if false == state then
deprecated_parameter (name); -- parameter is deprecated but still supported
return true;
end
-- all enumerated parameters allowed
name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits)
state = whitelist.numbered_arguments[name];
if true == state then return true; end -- valid actively supported parameter
if false == state then
deprecated_parameter (name); -- parameter is deprecated but still supported
return true;
end
return false; -- not supported because not found or name is set to nil
end
--[[--------------------------< M I S S I N G _ P I P E _ C H E C K >------------------------------------------
Look at the contents of a parameter. If the content has a string of characters and digits followed by an equal
sign, compare the alphanumeric string to the list of cs1|2 parameters. If found, then the string is possibly a
parameter that is missing its pipe:
{{cite ... |title=Title access-date=2016-03-17}}
cs1|2 shares some parameter names with xml/html atributes: class=, title=, etc. To prevent false positives xml/html
tags are removed before the search.
If a missing pipe is detected, this function adds the missing pipe maintenance category.
]]
local function missing_pipe_check (parameter, value)
local capture;
value = value:gsub ('%b<>', ''); -- remove xml/html tags because attributes: class=, title=, etc
capture = value:match ('%s+(%a[%w%-]+)%s*=') or value:match ('^(%a[%w%-]+)%s*='); -- find and categorize parameters with possible missing pipes
if capture and validate (capture) then -- if the capture is a valid parameter name
table.insert( z.message_tail, {set_error ('missing_pipe',parameter)});
end
end
--[[--------------------------< H A S _ E X T R A N E O U S _ P U N C T >--------------------------------------
look for extraneous terminal punctuation in most parameter values; parameters listed in skip table are not checked
]]
local function has_extraneous_punc (param, value)
if cfg.punct_skip[param] then
return; -- parameter name found in the skip table so done
end
if value:match ('[,;:]$') then
add_maint_cat ('extra_punct'); -- has extraneous punctuation; add maint cat
end
end
--[[--------------------------< C I T A T I O N >--------------------------------------------------------------
This is used by templates such as {{cite book}} to create the actual citation text.
]]
local function citation(frame)
Frame = frame; -- save a copy incase we need to display an error message in preview mode
local pframe = frame:getParent()
local validation, utilities, identifiers, metadata, styles;
if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version?
cfg = mw.loadData ('Module:Citation/CS1/Configuration/sandbox'); -- load sandbox versions of support modules
whitelist = mw.loadData ('Module:Citation/CS1/Whitelist/sandbox');
utilities = require ('Module:Citation/CS1/Utilities/sandbox');
validation = require ('Module:Citation/CS1/Date_validation/sandbox');
identifiers = require ('Module:Citation/CS1/Identifiers/sandbox');
metadata = require ('Module:Citation/CS1/COinS/sandbox');
styles = 'Module:Citation/CS1/sandbox/styles.css';
else -- otherwise
cfg = mw.loadData ('Module:Citation/CS1/Configuration'); -- load live versions of support modules
whitelist = mw.loadData ('Module:Citation/CS1/Whitelist');
utilities = require ('Module:Citation/CS1/Utilities');
validation = require ('Module:Citation/CS1/Date_validation');
identifiers = require ('Module:Citation/CS1/Identifiers');
metadata = require ('Module:Citation/CS1/COinS');
styles = 'Module:Citation/CS1/styles.css';
end
utilities.set_selected_modules (cfg); -- so that functions in Utilities can see the cfg tables
identifiers.set_selected_modules (cfg, utilities); -- so that functions in Identifiers can see the selected cfg tables and selected Utilities module
validation.set_selected_modules (cfg, utilities); -- so that functions in Date validataion can see selected cfg tables and the selected Utilities module
metadata.set_selected_modules (cfg, utilities); -- so that functions in COinS can see the selected cfg tables and selected Utilities module
dates = validation.dates; -- imported functions from Module:Citation/CS1/Date validation
year_date_check = validation.year_date_check;
reformat_dates = validation.reformat_dates;
date_hyphen_to_dash = validation.date_hyphen_to_dash;
date_name_xlate = validation.date_name_xlate;
is_set = utilities.is_set; -- imported functions from Module:Citation/CS1/Utilities
in_array = utilities.in_array;
substitute = utilities.substitute;
error_comment = utilities.error_comment;
set_error = utilities.set_error;
select_one = utilities.select_one;
add_maint_cat = utilities.add_maint_cat;
wrap_style = utilities.wrap_style;
safe_for_italics = utilities.safe_for_italics;
is_wikilink = utilities.is_wikilink;
make_wikilink = utilities.make_wikilink;
strip_apostrophe_markup = utilities.strip_apostrophe_markup;
z = utilities.z; -- table of error and category tables in Module:Citation/CS1/Utilities
extract_ids = identifiers.extract_ids; -- imported functions from Module:Citation/CS1/Identifiers
build_id_list = identifiers.build_id_list;
is_embargoed = identifiers.is_embargoed;
extract_id_access_levels = identifiers.extract_id_access_levels;
make_coins_title = metadata.make_coins_title; -- imported functions from Module:Citation/CS1/COinS
get_coins_pages = metadata.get_coins_pages;
COinS = metadata.COinS;
local args = {}; -- table where we store all of the template's arguments
local suggestions = {}; -- table where we store suggestions if we need to loadData them
local error_text, error_state;
local config = {}; -- table to store parameters from the module {{#invoke:}}
for k, v in pairs( frame.args ) do
config[k] = v;
-- args[k] = v; -- debug tool that allows us to render a citation from module {{#invoke:}}
end
local capture; -- the single supported capture when matching unknown parameters using patterns
for k, v in pairs( pframe.args ) do
if v ~= '' then
if ('string' == type (k)) then
k = mw.ustring.gsub (k, '%d', cfg.date_names.local_digits); -- for enumerated parameters, translate 'local' digits to Western 0-9
end
if not validate( k, config.CitationClass ) then
error_text = "";
if type( k ) ~= 'string' then
-- Exclude empty numbered parameters
if v:match("%S+") ~= nil then
error_text, error_state = set_error( 'text_ignored', {v}, true );
end
elseif validate( k:lower(), config.CitationClass ) then
error_text, error_state = set_error( 'parameter_ignored_suggest', {k, k:lower()}, true ); -- suggest the lowercase version of the parameter
else
if nil == suggestions.suggestions then -- if this table is nil then we need to load it
if nil ~= string.find (frame:getTitle(), 'sandbox', 1, true) then -- did the {{#invoke:}} use sandbox version?
suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions/sandbox' ); -- use the sandbox version
else
suggestions = mw.loadData( 'Module:Citation/CS1/Suggestions' ); -- use the live version
end
end
for pattern, param in pairs (suggestions.patterns) do -- loop through the patterns to see if we can suggest a proper parameter
capture = k:match (pattern); -- the whole match if no caputre in pattern else the capture if a match
if capture then -- if the pattern matches
param = substitute (param, capture); -- add the capture to the suggested parameter (typically the enumerator)
if validate (param, config.CitationClass) then -- validate the suggestion to make sure that the suggestion is supported by this template (necessary for limited parameter lists)
error_text, error_state = set_error ('parameter_ignored_suggest', {k, param}, true); -- set the suggestion error message
else
error_text, error_state = set_error( 'parameter_ignored', {param}, true ); -- suggested param not supported by this template
v = ''; -- unset
end
end
end
if not is_set (error_text) then -- couldn't match with a pattern, is there an expicit suggestion?
if suggestions.suggestions[ k:lower() ] ~= nil then
error_text, error_state = set_error( 'parameter_ignored_suggest', {k, suggestions.suggestions[ k:lower() ]}, true );
else
error_text, error_state = set_error( 'parameter_ignored', {k}, true );
v = ''; -- unset value assigned to unrecognized parameters (this for the limited parameter lists)
end
end
end
if error_text ~= '' then
table.insert( z.message_tail, {error_text, error_state} );
end
end
missing_pipe_check (k, v); -- do we think that there is a parameter that is missing a pipe?
-- TODO: is this the best place for this translation?
args[k] = v;
elseif args[k] ~= nil or (k == 'postscript') then -- here when v is empty string
args[k] = v; -- why do we do this? we don't support 'empty' parameters
end
end
for k, v in pairs( args ) do
if 'string' == type (k) then -- don't evaluate positional parameters
has_invisible_chars (k, v);
has_extraneous_punc (k, v); -- look for extraneous terminal punctuation in parameter values
end
end
return table.concat ({citation0( config, args), frame:extensionTag ('templatestyles', '', {src=styles})});
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {citation = citation};
a5feb2cf853a747bb079162056a94b701cdc2518
Модуль:Citation/CS1/Configuration
828
10
13
2022-07-19T12:22:46Z
CyberTailor
2
иморт модуля
Scribunto
text/plain
local citation_config = {};
--[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------
List of namespaces that should not be included in citation error categories. Same as setting notracking = true by default
Note: Namespace names should use underscores instead of spaces.
]]
local uncategorized_namespaces = { --[['Участник', закомментировано, т. к. тестируется на Участник:Vort/CJ]] 'Обсуждение', 'Обсуждение_участника', 'Обсуждение_Википедии', 'Обсуждение_файла', 'Обсуждение_шаблона', 'Обсуждение_категории', 'Обсуждение_портала', 'Обсуждение_модуля', 'Обсуждение_портала', 'Обсуждение_MediaWiki', 'Обсуждение_арбитража', 'Обсуждение_Инкубатора' };
local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases', '/[Пп]есочница', '/[Тт]есты'}; -- list of Lua patterns found in page names of pages we should not categorize
--[[--------------------------< M E S S A G E S >--------------------------------------------------------------
Translation table
The following contains fixed text that may be output as part of a citation.
This is separated from the main body to aid in future translations of this
module.
]]
local messages = {
['archived-dead'] = 'Архивировано из $1 $2',
['archived-not-dead'] = '$1 из оригинала $2',
['archived-missing'] = 'Архивировано из оригинала$1 $2',
['archived'] = 'Архивировано',
['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword
['cartography'] = 'Cartography by $1',
['editor'] = 'ed.',
['editors'] = 'eds.',
['edition'] = '($1 ed.)',
['episode'] = 'Episode $1',
['et al'] = 'et al.',
['in'] = 'In', -- edited works
['inactive'] = 'inactive',
['inset'] = '$1 inset',
['interview'] = 'Interviewed by $1',
['lay summary'] = 'Lay summary',
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]: $1',
['original'] = 'оригинала',
['published'] = ' (published $1)',
['retrieved'] = 'Дата обращения $1',
['season'] = 'Season $1',
['section'] = '§ $1',
['sections'] = '§§ $1',
['series'] = 'Series $1',
['translated'] = 'Translated by $1',
['type'] = ' ($1)', -- for titletype
['written'] = 'Written at $1',
['vol'] = '$1 Vol. $2', -- $1 is sepc; bold journal style volume is in presentation{}
['vol-no'] = '$1 Vol. $2 no. $3', -- sepc, volume, issue
['issue'] = '$1 No. $2', -- $1 is sepc
['j-vol'] = '$1 $2', -- sepc, volume; bold journal volume is in presentation{}
['j-issue'] = ' ($1)',
['nopp'] = '$1 $2'; -- page(s) without prefix; $1 is sepc
['p-prefix'] = "$1 p. $2", -- $1 is sepc
['pp-prefix'] = "$1 pp. $2", -- $1 is sepc
['j-page(s)'] = ': $1', -- same for page and pages
['sheet'] = '$1 Sheet $2', -- $1 is sepc
['sheets'] = '$1 Sheets $2', -- $1 is sepc
['j-sheet'] = ': Sheet $1',
['j-sheets'] = ': Sheets $1',
['subscription'] = '<span class="cs1-subscription">(Subscription required (<span title="The site requires a paid subscription to access this page.">help</span>))</span>',
-- '[[Category:Pages containing links to subscription-only content]]',
['registration']='<span class="cs1-registration">(Registration required (<span title="The site requires registration to access this page.">help</span>))</span>',
-- '[[Category:Pages with login required references or sources]]',
['language'] = '[$1]',
['via'] = " – via $1",
['event'] = 'Event occurs at',
['minutes'] = 'minutes in',
['parameter-separator'] = ', ',
['parameter-final-separator'] = ' и ',
['parameter-pair-separator'] = ' и ',
-- Determines the location of the help page
['help page link'] = 'Википедия:Ошибки шаблонов CS1/2',
['help page label'] = 'справка',
-- Internal errors (should only occur if configuration is bad)
['undefined_error'] = 'Called with an undefined error condition',
['unknown_manual_ID'] = 'Unrecognized manual ID mode',
['unknown_ID_mode'] = 'Unrecognized ID mode',
['unknown_argument_map'] = 'Argument map not defined for this variable',
['bare_url_no_origin'] = 'Bare url found but origin indicator is nil or empty',
}
--[[--------------------------< P R E S E N T A T I O N >------------------------------------------------------
Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically
correct place.
]]
local presentation =
{
-- Error output
-- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538
-- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display
['hidden-error'] = '<span class="cs1-hidden-error error citation-comment">$1</span>',
['visible-error'] = '<span class="cs1-visible-error error citation-comment">$1</span>',
['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal css
['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like
['cite'] = '<cite class="$1">$2</cite>'; -- |ref= not set so no id="..." attribute
['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- for use when |ref= is set
['format'] = ' <span class="cs1-format">($1)</span>', -- for |format=, |chapter-format=, etc
-- various access levels, for |access=, |doi-access=, |arxiv=, ...
-- narrow no-break space   may work better than nowrap css. Or not? browser support?
['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>', -- external link with appropriate lock icon
['free'] = {class='cs1-lock-free', title='Freely accessible'}, -- classes defined in Module:Citation/CS1/styles.css
['registration'] = {class='cs1-lock-registration', title='Free registration required'},
['limited'] = {class='cs1-lock-limited', title='Free access subject to limited trial, subscription normally required'},
['subscription'] = {class='cs1-lock-subscription', title='Paid subscription required'},
['italic-title'] = "''$1''",
['kern-left'] = '<span class="cs1-kern-left">$1</span>$2', -- spacing to use when title contains leading single or double quote mark
['kern-right'] = '$1<span class="cs1-kern-right">$2</span>', -- spacing to use when title contains trailing single or double quote mark
-- these for simple wikilinked titles [["text]], [[text"]] and [["text"]]
-- span wraps entire wikilink
['kern-wl-left'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains leading single or double quote mark
['kern-wl-right'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains trailing single or double quote mark
['kern-wl-both'] = '<span class="cs1-kern-wl-left cs1-kern-wl-right">$1</span>', -- when title contains leading and trailing single or double quote marks
['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span>
['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space)
['ocins'] = '<span title="$1" class="Z3988"></span>',
['parameter'] = '<code class="cs1-code">|$1=</code>',
['ps_cs1'] = '.'; -- cs1 style postscript (terminal) character
['ps_cs2'] = ''; -- cs2 style postscript (terminal) character (empty string)
['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content
['quoted-title'] = '“$1”',
['sep_cs1'] = '.', -- cs1 element separator
['sep_cs2'] = ',', -- cs2 separator
['sep_nl'] = ';', -- cs1|2 style name-list separator between authors is a semicolon
['sep_name'] = ', ', -- cs1|2 style last/first separator is <comma><space>
['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma
['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space
['trans-italic-title'] = "[''$1'']",
['trans-quoted-title'] = "[$1]",
['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{}
}
--[[--------------------------< A L I A S E S >----------------------------------------------------------------
Aliases table for commonly passed parameters
]]
local aliases = {
['AccessDate'] = {'access-date', 'accessdate'},
['Agency'] = 'agency',
['AirDate'] = {'air-date', 'airdate'},
['ArchiveDate'] = {'archive-date', 'archivedate'},
['ArchiveFormat'] = 'archive-format',
['ArchiveURL'] = {'archive-url', 'archiveurl'},
['ASINTLD'] = {'ASIN-TLD', 'asin-tld'},
['At'] = 'at',
['Authors'] = {'authors', 'people', 'host', 'credits'},
['BookTitle'] = {'book-title', 'booktitle'},
['Cartography'] = 'cartography',
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},
['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'};
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'entry-url', 'article-url', 'section-url', 'sectionurl'},
['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'},
['Class'] = 'class', -- cite arxiv and arxiv identifiers
['Coauthors'] = {'coauthors', 'coauthor' }, -- для рувики (а вообще депрекированный)
['Collaboration'] = 'collaboration',
['Conference'] = {'conference', 'event'},
['ConferenceFormat'] = {'conference-format', 'event-format'},
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'},
['Contribution'] = 'contribution', -- introduction, foreword, afterword, etc; required when |contributor= set
['Date'] = 'date',
['DeadURL'] = {'deadlink', 'dead-url', 'deadurl'}, -- для рувики (TODO: перепроверить)
['Degree'] = 'degree',
['DF'] = 'df',
['DisplayAuthors'] = {'display-authors', 'displayauthors'},
['DisplayEditors'] = {'display-editors', 'displayeditors'},
['Docket'] = 'docket',
['DoiBroken'] = {'doi-broken', 'doi-broken-date', 'doi-inactive-date'},
['Edition'] = 'edition',
['Editors'] = 'editors',
['Embargo'] = 'embargo',
['Encyclopedia'] = {'encyclopedia', 'encyclopaedia'}, -- this one only used by citation
['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode?
['Format'] = 'format',
['ID'] = {'id', 'ID'},
['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'},
['Inset'] = 'inset',
['Issue'] = {'issue', 'number'},
['Interviewers'] = 'interviewers',
['Language'] = {'language', 'lang'},
['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp'},
['LayDate'] = {'lay-date', 'laydate'},
['LayFormat'] = 'lay-format',
['LaySource'] = {'lay-source', 'laysource'},
['LayURL'] = {'lay-url', 'lay-summary', 'layurl', 'laysummary'},
['MailingList'] = {'mailinglist', 'mailing-list'}, -- cite mailing list only
['Map'] = 'map', -- cite map only
['MapFormat'] = 'map-format', -- cite map only
['MapURL'] = {'mapurl', 'map-url'}, -- cite map only
['MessageID'] = 'message-id',
['Minutes'] = 'minutes',
['Mode'] = 'mode',
['Month'] = 'month', -- для рувики (а вообще депрекированный)
['NameListFormat'] = 'name-list-format',
['Network'] = 'network',
['NoPP'] = {'no-pp', 'nopp'},
['NoTracking'] = {'template-doc-demo', 'no-cat', 'nocat',
'no-tracking', 'notracking'},
['Number'] = 'number', -- this case only for cite techreport
['OrigYear'] = {'orig-year', 'origyear'},
['Others'] = 'others',
['Page'] = {'p', 'page'},
['Pages'] = {'pp', 'pages'},
['Periodical'] = {'journal', 'newspaper', 'magazine', 'work',
'website', 'periodical', 'encyclopedia', 'encyclopaedia', 'dictionary', 'mailinglist'},
['Place'] = {'place', 'location'},
['PostScript'] = 'postscript',
['PublicationDate'] = {'publicationdate', 'publication-date'},
['PublicationPlace'] = {'publication-place', 'publicationplace'},
['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup'},
['Quote'] = {'quote', 'quotation'},
['Ref'] = 'ref',
['RegistrationRequired'] = 'registration',
['Scale'] = 'scale',
['ScriptChapter'] = 'script-chapter',
['ScriptTitle'] = 'script-title',
['Section'] = 'section',
['Season'] = 'season',
['Sections'] = 'sections', -- cite map only
['Series'] = {'series', 'version'},
['SeriesSeparator'] = 'series-separator',
['SeriesLink'] = {'series-link', 'serieslink'},
['SeriesNumber'] = {'series-number', 'series-no', 'seriesnumber', 'seriesno'},
['Sheet'] = 'sheet', -- cite map only
['Sheets'] = 'sheets', -- cite map only
['Station'] = 'station',
['SubscriptionRequired'] = 'subscription',
['Time'] = 'time',
['TimeCaption'] = {'time-caption', 'timecaption'},
['Title'] = 'title',
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'},
['TitleNote'] = 'department',
['TitleType'] = {'type', 'medium'},
['TransChapter'] = 'trans-chapter',
['TransMap'] = 'trans-map', -- cite map only
['Transcript'] = 'transcript',
['TranscriptFormat'] = 'transcript-format',
['TranscriptURL'] = {'transcript-url', 'transcripturl'},
['TransTitle'] = 'trans-title',
['URL'] = {'url', 'URL'},
['UrlAccess'] = {'url-access'},
['Vauthors'] = 'vauthors',
['Veditors'] = 'veditors',
['Via'] = 'via',
['Volume'] = 'volume',
['Year'] = 'year',
['AuthorList-First'] = {"first#", "given#", "author-first#", "author#-first"},
['AuthorList-Last'] = {"last#", "author#", "surname#", "author-last#", "author#-last", "subject#"},
['AuthorList-Link'] = {"authorlink#", "author-link#", "author#-link", "subjectlink#", "author#link", "subject-link#", "subject#-link", "subject#link"},
['AuthorList-Mask'] = {"author-mask#", "authormask#", "author#mask", "author#-mask"},
['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given'},
['ContributorList-Last'] = {'contributor#', 'contributor-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname'},
['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'},
['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'},
['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"},
['EditorList-Last'] = {"editor#", "editor-last#", "editor#-last", "editor-surname#", "editor#-surname"},
['EditorList-Link'] = {"editor-link#", "editor#-link", "editorlink#", "editor#link"},
['EditorList-Mask'] = {"editor-mask#", "editor#-mask", "editormask#", "editor#mask"},
['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first'},
['InterviewerList-Last'] = {'interviewer#', 'interviewer-last#', 'interviewer#-last'},
['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'},
['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'},
['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given'},
['TranslatorList-Last'] = {'translator#', 'translator-last#', 'translator#-last', 'translator-surname#', 'translator#-surname'},
['TranslatorList-Link'] = {'translator-link#', 'translator#-link'},
['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'},
}
--[[--------------------------< S P E C I A L C A S E T R A N S L A T I O N S >----------------------------
This table is primarily here to support internationalization. Translations in this table are used, for example,
when an error message, category name, etc is extracted from the English alias key. There may be other cases where
this translation table may be useful.
]]
local special_case_translation = {
['AuthorList'] = "authors list", -- these for multiple names maint categories
['ContributorList'] = "contributors list",
['EditorList'] = "editors list",
['InterviewerList'] = "interviewers list",
['TranslatorList'] = "translators list",
['authors'] = "authors", -- used in get_display_authors_editors()
['editors'] = "editors",
['archived_copy'] = '^archived?%s+copy$', -- lua pattern to match pseudo title used by Internet Archive bot and others as place holder for unknown |title= value
-- used with CS1 maint: Archived copy as title
}
--[[--------------------------< D E F A U L T S >--------------------------------------------------------------
Default parameter values
TODO: keep this? Only one default?
]]
local defaults = {
['DeadURL'] = 'yes',
}
--[[--------------------------< D A T E _ N A M E S >----------------------------------------------------------
This table of tables lists local language date names and fallback English date names. The code in Date_validation
will look first in the local table for valid date names. If date names are not found in the local table, the code
will look in the English table.
Because citations can be copied to the local wiki from en.wiki, the English is required when the date-name translation
function date_name_xlate() is used.
In these tables, season numbering is defined by ISO DIS 8601:2016 part 2 §4.7 'Divisions of a year'. The standard
defines various divisions using numbers 21-41. cs1|2 only supports generic seasons. ISO DIS 8601:2016 does support
the distinction between north and south hemispere seasons but cs1|2 has no way to make that distinction.
The standard does not address 'named' dates so, for the purposes of cs1|2, Christmas is defined here as 99, which
should be out of the ISO DIS 8601:2016 range of uses for a while.
]]
local date_names = {
['en'] = { -- English
['long'] = {['January']=1, ['February']=2, ['March']=3, ['April']=4, ['May']=5, ['June']=6, ['July']=7, ['August']=8, ['September']=9, ['October']=10, ['November']=11, ['December']=12};
['short'] = {['Jan']=1, ['Feb']=2, ['Mar']=3, ['Apr']=4, ['May']=5, ['Jun']=6, ['Jul']=7, ['Aug']=8, ['Sep']=9, ['Oct']=10, ['Nov']=11, ['Dec']=12};
['season'] = {['Winter']=24, ['Spring']=21, ['Summer']=22, ['Fall']=23, ['Autumn']=23};
['named'] = {['Christmas']=99};
},
['local'] = { -- replace these English date names with the local language equivalents
['long'] = {['Январь']=1, ['Февраль']=2, ['Март']=3, ['Апрель']=4, ['Май']=5, ['Июнь']=6, ['Июль']=7, ['Август']=8, ['Сентябрь']=9, ['Октябрь']=10, ['Ноябрь']=11, ['Декабрь']=12,
['января']=1, ['февраля']=2, ['марта']=3, ['апреля']=4, ['мая']=5, ['июня']=6, ['июля']=7, ['августа']=8, ['сентября']=9, ['октября']=10, ['ноября']=11, ['декабря']=12};
['short'] = {['Янв']=1, ['Фев']=2, ['Мар']=3, ['Апр']=4, ['Май']=5, ['Июн']=6, ['Июл']=7, ['Авг']=8, ['Сен']=9, ['Окт']=10, ['Нов']=11, ['Дек']=12};
['season'] = {['Зима']=24, ['Весна']=21, ['Лето']=22, ['Осень']=23};
['named'] = {};
},
['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}; -- used to convert local language digits to Western 0-9
['xlate_digits'] = {};
}
for ld, ed in pairs (date_names.local_digits) do -- make a digit translation table for simple date translation from en to local language using local_digits table
date_names.xlate_digits [ed] = ld; -- en digit becomes index with local digit as the value
end
--[[--------------------------< V O L U M E , I S S U E , P A G E S >----------------------------------------
These tables hold cite class values (from the template invocation) and identify those templates that support
|volume=, |issue=, and |page(s)= parameters. Cite conference and cite map require further qualification which
is handled in the main module.
]]
local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport', 'thesis'}
local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news'}
local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'}
--[[--------------------------< K E Y W O R D S >--------------------------------------------------------------
This table holds keywords for those parameters that have defined sets of acceptible keywords.
]]
local keywords = {
['yes_true_y'] = {'yes', 'true', 'y'}, -- ignore-isbn-error, last-author-amp, no-tracking, nopp, registration, subscription
-- ['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped', 'unfit no archive', 'usurped no archive'}, -- hidden 2016-04-10; see Help_talk:Citation_Style_1#Recycled_urls
['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped', 'bot: unknown'},
['mode'] = {'cs1', 'cs2', 'mla'},
['name-list-format'] = {'vanc'},
['contribution'] = {'afterword', 'foreword', 'introduction', 'preface'}, -- generic contribution titles that are rendered unquoted in the 'chapter' position
['date-format'] = {'dmy', 'dmy-all', 'mdy', 'mdy-all', 'ymd', 'ymd-all'},
['url-access'] = {'subscription', 'limited', 'registration'}, -- access level of a URL (subscription required, limited access, free registration required), free to read by default
['id-access'] = {'free'}, -- access level of an identifier (free to read), subscription required (or no full text) by default
}
--[[--------------------------< S T R I P M A R K E R S >------------------------------------------------------
Common pattern definition location for stripmarkers so that we don't have to go hunting for them if (when)
MediaWiki changes their form.
]]
local stripmarkers = {
['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- capture returns name of stripmarker
['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- math stripmarkers used in coins_cleanup() and coins_replace_math_stripmarker()
}
--[[--------------------------< I N V I S I B L E _ C H A R A C T E R S >--------------------------------------
This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal
representations of UTF-8 codes. The table is organized as a table of tables because the lua pairs keyword returns
table data in an arbitrary order. Here, we want to process the table from top to bottom because the entries at
the top of the table are also found in the ranges specified by the entries at the bottom of the table.
This list contains patterns for templates like {{'}} which isn't an error but transcludes characters that are
invisible. These kinds of patterns must be recognized by the functions that use this list.
Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters. The nowiki
stripmarker is not an error but some others are because the parameter values that include them become part of the
template's metadata before stripmarker replacement.
]]
-- символ какой или символ чего
local invisible_chars = {
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD
{'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B
{'hair space', '\226\128\138'}, -- U+200A, E2 80 8A
{'soft hyphen', '\194\173'}, -- U+00AD, C2 AD
{'horizontal tab', '\009'}, -- U+0009 (HT), 09
{'переноса строки', '\010'}, -- U+000A (LF), 0A
{'возврата каретки', '\013'}, -- U+000D (CR), 0D
{'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type
{'delete', '\127'}, -- U+007F (DEL), 7F; must be done after stripmarker test
{'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D))
{'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F
-- {'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF
-- {'Private use area', '[\238\128\128-\239\163\191]'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF
-- {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD
-- {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD
}
--[[
Indic script makes use of zero width joiner as a character modifier so zwj characters must be left in. This
pattern covers all of the unicode characters for these languages:
Devanagari 0900–097F – https://unicode.org/charts/PDF/U0900.pdf
Devanagari extended A8E0–A8FF – https://unicode.org/charts/PDF/UA8E0.pdf
Bengali 0980–09FF – https://unicode.org/charts/PDF/U0980.pdf
Gurmukhi 0A00–0A7F – https://unicode.org/charts/PDF/U0A00.pdf
Gujarati 0A80–0AFF – https://unicode.org/charts/PDF/U0A80.pdf
Oriya 0B00–0B7F – https://unicode.org/charts/PDF/U0B00.pdf
Tamil 0B80–0BFF – https://unicode.org/charts/PDF/U0B80.pdf
Telugu 0C00–0C7F – https://unicode.org/charts/PDF/U0C00.pdf
Kannada 0C80–0CFF – https://unicode.org/charts/PDF/U0C80.pdf
Malayalam 0D00–0D7F – https://unicode.org/charts/PDF/U0D00.pdf
plus the not-necessarily Indic scripts for Sinhala and Burmese:
Sinhala 0D80-0DFF - https://unicode.org/charts/PDF/U0D80.pdf
Myanmar 1000-109F - https://unicode.org/charts/PDF/U1000.pdf
Myanmar extended A AA60-AA7F - https://unicode.org/charts/PDF/UAA60.pdf
Myanmar extended B A9E0-A9FF - https://unicode.org/charts/PDF/UA9E0.pdf
the pattern is used by has_invisible_chars() and coins_cleanup()
TODO: find a better place for this?
]]
local indic_script = '[\224\164\128-\224\181\191\224\163\160-\224\183\191\225\128\128-\225\130\159\234\167\160-\234\167\191\234\169\160-\234\169\191]';
--[[--------------------------< L A N G U A G E S >------------------------------------------------------------
This table is used to hold ISO 639-1 two-character language codes that apply only to |script-title= and |script-chapter=
]]
local script_lang_codes = {
'am', 'ar', 'be', 'bg', 'bn', 'bs', 'dv', 'el', 'fa', -- ISO 639-1 codes only for |script-title= and |script-chapter=
'gu', 'he', 'hy', 'ja', 'ka', 'kn', 'ko', 'ku',
'mk', 'ml', 'mn', 'mr', 'my', 'ps', 'ru', 'sd',
'sr', 'tg', 'th', 'uk', 'ug', 'ur', 'yi', 'zh'
};
--[[--------------------------< L A N G U A G E R E M A P P I N G >------------------------------------------
These tables hold language information that is different (correct) from MediaWiki's definitions
]]
local lang_code_remap = { -- used for |language= and |script-title= / |script-chapter=
['bh'] = 'Bihari', -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri wWikipedia: bh.wikipedia.org
['bn'] = 'Bengali', -- MediaWiki returns Bangla
['cnr'] = 'Montenegrin', -- 'new' 639 code that MediaWiki does not yet understand
}
local lang_name_remap = { -- used for |language=
['bangla'] = {'Bengali', 'bn'}, -- MediaWiki returns Bangla (the endonym) but we want Bengali (the exonym); here we remap
['bengali'] = {'Bengali', 'bn'}, -- MediaWiki doesn't use exonym so here we provide correct language name and 639-1 code
['bihari'] = {'Bihari', 'bh'}, -- MediaWiki replaces 'Bihari' with 'Bhojpuri' so 'Bihari' cannot be found
['bhojpuri'] = {'Bhojpuri', 'bho'}, -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri wWikipedia: bh.wikipedia.org
['montenegrin'] = {'Montenegrin', 'cnr'}, -- 'new' 639 code that MediaWiki does not yet understand
}
--[[--------------------------< M A I N T E N A N C E _ C A T E G O R I E S >----------------------------------
Here we name maintenance categories to be used in maintenance messages.
]]
-- для рувики: эти категории отключены через add_maint_cat = function () end;
local maint_cats = {
['ASIN'] = 'CS1 maint: ASIN uses ISBN',
['archived_copy'] = 'CS1 maint: Archived copy as title',
['authors'] = 'CS1 maint: Uses authors parameter',
['bot:_unknown'] = 'CS1 maint: BOT: original-url status unknown',
['date_format'] = 'CS1 maint: Date format',
['date_year'] = 'CS1 maint: Date and year',
['disp_auth_ed'] = 'CS1 maint: display-$1', -- $1 is authors or editors; gets value from special_case_translation table
['editors'] = 'CS1 maint: Uses editors parameter',
['embargo'] = 'CS1 maint: PMC embargo expired',
['english'] = 'CS1 maint: English language specified',
['etal'] = 'CS1 maint: Explicit use of et al.',
['extra_text'] = 'CS1 maint: Extra text',
['extra_text_names'] = 'CS1 maint: Extra text: $1', -- $1 is <name>s list; gets value from special_case_translation table
['ignore_isbn_err'] = 'CS1 maint: Ignored ISBN errors',
['interviewers'] = 'CS1 maint: Uses interviewers parameter',
['missing_pipe'] = 'CS1 maint: Missing pipe',
['mult_names'] = 'CS1 maint: Multiple names: $1', -- $1 is <name>s list; gets value from special_case_translation table
['pmc_format'] = 'CS1 maint: PMC format',
['unfit'] = 'CS1 maint: Unfit url',
['unknown_lang'] = 'CS1 maint: Unrecognized language',
['untitled'] = 'CS1 maint: Untitled periodical',
}
--[[--------------------------< P R O P E R T I E S _ C A T E G O R I E S >------------------------------------
Here we name properties categories
]]
-- для рувики: эти категории отключены закомментированием add_prop_cat
local prop_cats = {
['foreign_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is language name, $2 is ISO639-1 code
['foreign_lang_source_2'] = 'CS1 foreign language sources (ISO 639-2)|$1', -- |language= category; a cat for ISO639-2 languages; $1 is the ISO 639-2 code
['script'] = 'CS1 uses foreign language script', -- when language specified by |script-title=xx: doesn't have its own category
['script_with_name'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code
['jul_greg_uncertainty'] = 'CS1: Julian–Gregorian uncertainty', -- probably temporary cat to identify scope of template with dates 1 October 1582 – 1 January 1926
}
--[[--------------------------< T I T L E _ T Y P E S >--------------------------------------------------------
Here we map a template's CitationClass to TitleType (default values for |type= parameter)
]]
local title_types = {
['AV-media-notes'] = 'Media notes',
['interview'] = 'Interview',
['mailinglist'] = 'Mailing list',
['map'] = 'Map',
['podcast'] = 'Podcast',
['pressrelease'] = 'Press release',
['report'] = 'Report',
['techreport'] = 'Technical report',
['thesis'] = 'Thesis',
}
--[[--------------------------< E R R O R _ C O N D I T I O N S >----------------------------------------------
Error condition table
The following contains a list of IDs for various error conditions defined in the code. For each ID, we specify a
text message to display, an error category to include, and whether the error message should be wrapped as a hidden comment.
Anchor changes require identical changes to matching anchor in Help:CS1 errors
]]
-- для рувики: anchor_label и anchor_page позволяют указывать справку на нестандартной странице - например, в англовики
local error_conditions = {
accessdate_missing_url = {
message = '<code class="cs1-code">|access-date=</code> требует <code class="cs1-code">|url=</code>',
anchor = 'accessdate_missing_url',
-- category = 'Pages using citations with accessdate and no URL',
category = 'Ошибки CS1: accessdate без URL',
hidden = true -- для рувики: часто используют с идентификаторами вроде DOI
},
archive_missing_date = {
message = '<code class="cs1-code">|archive-url=</code> требует <code class="cs1-code">|archive-date=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'archive_missing_date',
-- category = 'Pages with archiveurl citation errors',
category = 'Ошибки CS1: прочее|archiveurl',
hidden = false
},
archive_missing_url = {
message = '<code class="cs1-code">|archive-url=</code> требует <code class="cs1-code">|url=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'archive_missing_url',
-- category = 'Pages with archiveurl citation errors',
category = 'Ошибки CS1: прочее|archiveurl',
hidden = false
},
archive_url = {
message = 'Плохой <code class="cs1-code">|archive-url=</code>: $1',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'archive_url',
-- category = 'Pages with archiveurl citation errors',
category = 'Ошибки CS1: прочее|archiveurl',
hidden = false
},
arxiv_missing = {
message = 'Не хватает <code class="cs1-code">|arxiv=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'arxiv_missing',
-- category = 'CS1 errors: arXiv', -- same as bad arxiv
category = 'Ошибки CS1: прочее|arXiv',
hidden = false
},
arxiv_params_not_supported = {
message = 'Не поддерживаемые параметры в cite arXiv',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'arxiv_params_not_supported',
-- category = 'CS1 errors: arXiv', -- same as bad arxiv
category = 'Ошибки CS1: прочее|arXiv',
hidden = false
},
bad_arxiv = {
message = 'Проверьте параметр <code class="cs1-code">|arxiv=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_arxiv',
-- category = 'CS1 errors: arXiv',
category = 'Ошибки CS1: прочее|arXiv',
hidden = false
},
bad_asin = {
message = 'Проверьте параметр <code class="cs1-code">|asin=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_asin',
-- category ='CS1 errors: ASIN',
category = 'Ошибки CS1: прочее|ASIN',
hidden = false
},
bad_bibcode = {
message = 'Проверьте параметр <code class="cs1-code">|bibcode=</code> $1',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_bibcode',
-- category = 'CS1 errors: bibcode',
category = 'Ошибки CS1: прочее|bibcode',
hidden = false
},
bad_biorxiv = {
message = 'Проверьте параметр <code class="cs1-code">|biorxiv=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_biorxiv',
-- category = 'CS1 errors: bioRxiv',
category = 'Ошибки CS1: прочее|bioRxiv',
hidden = false
},
bad_citeseerx = {
message = 'Проверьте параметр <code class="cs1-code">|citeseerx=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_citeseerx',
-- category = 'CS1 errors: citeseerx',
category = 'Ошибки CS1: прочее|citeseerx',
hidden = false
},
bad_date = {
message = 'Проверьте дату в <code class="cs1-code">$1</code>',
anchor_label = 'справка на английском', -- TODO: перевести и убрать
anchor = 'bad_date',
-- category = 'CS1 errors: dates',
category = 'Ошибки CS1: даты',
hidden = true
},
bad_doi = {
message = 'Проверьте параметр <code class="cs1-code">|doi=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_doi',
-- category = 'CS1 errors: DOI',
category = 'Ошибки CS1: прочее|DOI',
hidden = false
},
bad_hdl = {
message = 'Проверьте параметр <code class="cs1-code">|hdl=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_hdl',
-- category = 'CS1 errors: HDL',
category = 'Ошибки CS1: прочее|HDL',
hidden = false
},
bad_isbn = {
message = 'Проверьте параметр <code class="cs1-code">|isbn=</code>: $1',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_isbn',
-- category = 'CS1 errors: ISBN',
category = 'Ошибки CS1: прочее|ISBN',
hidden = false
},
bad_ismn = {
message = 'Проверьте параметр <code class="cs1-code">|ismn=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_ismn',
-- category = 'CS1 errors: ISMN',
category = 'Ошибки CS1: прочее|ISMN',
hidden = false
},
bad_issn = {
message = 'Проверьте параметр <code class="cs1-code">|$1issn=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_issn',
-- category = 'CS1 errors: ISSN',
category = 'Ошибки CS1: прочее|ISSN',
hidden = false
},
bad_jfm = {
message = 'Проверьте параметр <code class="cs1-code">|jfm=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_jfm',
-- category = 'CS1 errors: JFM',
category = 'Ошибки CS1: прочее|JFM',
hidden = false
},
bad_lccn = {
message = 'Проверьте параметр <code class="cs1-code">|lccn=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_lccn',
-- category = 'CS1 errors: LCCN',
category = 'Ошибки CS1: прочее|LCCN',
hidden = false
},
bad_usenet_id = {
message = 'Проверьте параметр <code class="cs1-code">|message-id=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_message_id',
-- category = 'CS1 errors: message-id',
category = 'Ошибки CS1: прочее|message-id',
hidden = false
},
bad_mr = {
message = 'Проверьте параметр <code class="cs1-code">|mr=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_mr',
-- category = 'CS1 errors: MR',
category = 'Ошибки CS1: прочее|MR',
hidden = false
},
bad_ol = {
message = 'Проверьте параметр <code class="cs1-code">|ol=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_ol',
-- category = 'CS1 errors: OL',
category = 'Ошибки CS1: прочее|OL',
hidden = false
},
bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link=
message = 'Проверьте параметр <code class="cs1-code">|$1=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_paramlink',
-- category = 'CS1 errors: parameter link',
category = 'Ошибки CS1: прочее|параметр-викиссылка',
hidden = false
},
bad_pmc = {
message = 'Проверьте параметр <code class="cs1-code">|pmc=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_pmc',
-- category = 'CS1 errors: PMC',
category = 'Ошибки CS1: прочее|PMC',
hidden = false
},
bad_pmid = {
message = 'Проверьте параметр <code class="cs1-code">|pmid=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_pmid',
-- category = 'CS1 errors: PMID',
category = 'Ошибки CS1: прочее|PMID',
hidden = false
},
bad_oclc = {
message = 'Проверьте параметр <code class="cs1-code">|oclc=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_oclc',
-- category = 'CS1 errors: OCLC',
category = 'Ошибки CS1: прочее|OCLC',
hidden = false
},
err_bad_s2cid = {
message = 'Проверьте параметр <code class="cs1-code">|s2cid=</code>',
anchor = 'bad_s2cid',
category = 'Ошибки CS1: прочее|S2CID',
hidden = false
},
bad_ssrn = {
message = 'Проверьте параметр <code class="cs1-code">|ssrn=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_ssrn',
-- category = 'CS1 errors: SSRN',
category = 'Ошибки CS1: прочее|SSRN',
hidden = false
},
bad_url = {
message = 'Проверьте параметр $1',
anchor = 'bad_url',
-- category = 'Pages with URL errors',
category = 'Ошибки CS1: URL',
hidden = false
},
bad_zbl = {
message = 'Проверьте параметр <code class="cs1-code">|zbl=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'bad_zbl',
-- category = 'CS1 errors: ZBL',
category = 'Ошибки CS1: прочее|ZBL',
hidden = false
},
bare_url_missing_title = {
message = '$1 требует указать название',
anchor = 'bare_url_missing_title',
-- category = 'Pages with citations having bare URLs',
category = 'Ошибки CS1: прочее|голый URL',
hidden = false
},
biorxiv_missing = {
message = 'Требуется <code class="cs1-code">|biorxiv=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'biorxiv_missing',
-- category = 'CS1 errors: bioRxiv', -- same as bad bioRxiv
category = 'Ошибки CS1: прочее|bioRxiv',
hidden = false
},
chapter_ignored = {
message = 'Параметр <code class="cs1-code">|$1=</code> пропущен',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'chapter_ignored',
-- category = 'CS1 errors: chapter ignored',
category = 'Ошибки CS1: прочее|chapter',
hidden = false
},
citation_missing_title = {
message = '<code class="cs1-code">|$1=</code> пусто или отсутствует',
anchor = 'citation_missing_title',
-- category = 'Pages with citations lacking titles',
category = 'Ошибки CS1: не хватает названия',
hidden = false
},
citeseerx_missing = {
message = 'Требуется <code class="cs1-code">|citeseerx=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'citeseerx_missing',
-- category = 'CS1 errors: citeseerx', -- same as bad citeseerx
category = 'Ошибки CS1: прочее|citeseerx',
hidden = false
},
cite_web_url = { -- this error applies to cite web and to cite podcast
message = '<code class="cs1-code">|url=</code> пуст или отсутствует',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'cite_web_url',
-- category = 'Pages using web citations with no URL',
category = 'Ошибки CS1: прочее|интернет-источник без URL',
hidden = false
},
class_ignored = {
message = '<code class="cs1-code">|class=</code> проигнорирован',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'class_ignored',
-- category = 'CS1 errors: class',
category = 'Ошибки CS1: прочее|class',
hidden = false
},
contributor_ignored = {
message = '<code class="cs1-code">|contributor=</code> проигнорирован',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'contributor_ignored',
-- category = 'CS1 errors: contributor',
category = 'Ошибки CS1: прочее|contributor',
hidden = false
},
contributor_missing_required_param = {
message = '<code class="cs1-code">|contributor=</code> требует <code class="cs1-code">|$1=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'contributor_missing_required_param',
-- category = 'CS1 errors: contributor',
category = 'Ошибки CS1: прочее|contributor',
hidden = false
},
deprecated_params = {
message = 'Используется устаревший параметр <code class="cs1-code">|$1=</code>',
anchor = 'deprecated_params',
-- category = 'CS1 errors: deprecated parameters',
category = 'Ошибки CS1: устаревшие параметры',
hidden = true -- для рувики
},
empty_citation = {
message = 'Пустая ссылка на источник',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'empty_citation',
-- category = 'Pages with empty citations',
category = 'Ошибки CS1: прочее|пустая ссылка на источник',
hidden = false
},
first_missing_last = {
message = '<code class="cs1-code">|first$2=</code> требует <code class="cs1-code">|last$2=</code> в $1',
anchor = 'first_missing_last',
-- category = 'CS1 errors: missing author or editor',
category = 'Ошибки CS1: авторы',
hidden = false
},
format_missing_url = {
message = '<code class="cs1-code">|$1=</code> требует <code class="cs1-code">|$2=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'format_missing_url',
-- category = 'Pages using citations with format and no URL',
category = 'Ошибки CS1: прочее|format без URL',
hidden = false
},
invalid_param_val = {
message = 'Некорректное значение <code class="cs1-code">|$1=$2</code>',
anchor = 'invalid_param_val',
-- category = 'CS1 errors: invalid parameter value',
category = 'Ошибки CS1: некорректное значение параметра',
hidden = false
},
invisible_char = {
message = '$1 в $2 на позиции №$3',
anchor = 'invisible_char',
-- category = 'CS1 errors: invisible characters',
category = 'Ошибки CS1: невидимые символы',
hidden = false
},
missing_name = {
message = 'Не хватает <code class="cs1-code">|last$2=</code> в $1',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'missing_name',
-- category = 'CS1 errors: missing author or editor',
category = 'Ошибки CS1: авторы',
hidden = false
},
param_access_requires_param = {
message = '<code class="cs1-code">|$1-access=</code> требует <code class="cs1-code">|$1=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'param_access_requires_param',
-- category = 'CS1 errors: param-access',
category = 'Ошибки CS1: прочее|param-access',
hidden = false
},
param_has_ext_link = {
message = 'Внешняя ссылка в <code class="cs1-code">$1</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'param_has_ext_link',
-- category = 'CS1 errors: external links',
category = 'Ошибки CS1: внешние ссылки',
hidden = false
},
parameter_ignored = {
message = 'Неизвестный параметр <code class="cs1-code">|$1=</code>',
anchor = 'parameter_ignored',
-- category = 'Pages with citations using unsupported parameters',
category = 'Ошибки CS1: неизвестные параметры',
hidden = false
},
parameter_ignored_suggest = {
message = 'Неизвестный параметр <code class="cs1-code">|$1=</code> (предлагается <code class="cs1-code">|$2=</code>)',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'parameter_ignored_suggest',
-- category = 'Pages with citations using unsupported parameters',
category = 'Ошибки CS1: неизвестные параметры',
hidden = false
},
redundant_parameters = {
message = 'Параметры $1 дублируют друг друга',
anchor = 'redundant_parameters',
-- category = 'Pages with citations having redundant parameters',
category = 'Ошибки CS1: дублирующиеся параметры',
hidden = false
},
text_ignored = {
message = 'Текст "$1" пропущен',
anchor = 'text_ignored',
-- category = 'Pages with citations using unnamed parameters',
category = 'Ошибки CS1: неименованные параметры',
hidden = false
},
trans_missing_title = {
message = '<code class="cs1-code">|trans-$1=</code> требует <code class="cs1-code">|$1=</code>',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'trans_missing_title',
-- category = 'CS1 errors: translated title',
category = 'Ошибки CS1: прочее|переведённое название',
hidden = false
},
vancouver = {
message = 'Ошибка ванкуверского стиля цитирования: $1',
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'vancouver',
-- category = 'CS1 errors: Vancouver style',
category = 'Ошибки CS1: прочее|ванкуверский стиль',
hidden = false
},
wikilink_in_url = {
message = 'Конфликт URL — викиссылка', -- uses ndash
anchor_label = 'справка на английском',
anchor_page = ':en:Help:CS1 errors',
anchor = 'wikilink_in_url',
-- category = 'CS1 errors: URL–wikilink conflict', -- uses ndash
category = 'Ошибки CS1: прочее|викиссылка вместо URL',
hidden = false
},
}
--[[--------------------------< I D _ H A N D L E R S >--------------------------------------------------------
The following contains a list of values for various defined identifiers. For each identifier we specify a
variety of information necessary to properly render the identifier in the citation.
parameters: a list of parameter aliases for this identifier
link: Wikipedia article name
q: wikidata q number for the identifier
label: the alternate name to apply to link
mode: 'manual' when there is a specific function in the code to handle the identifier;
'external' for identifiers that link outside of Wikipedia;
prefix: the first part of a url that will be concatenated with a second part which usually contains the identifier
encode: true if uri should be percent encoded; otherwise false
COinS: identifier link or keyword for use in COinS:
for identifiers registered at info-uri.info use: info:....
for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn
for others make a url using the value in prefix, use the keyword: pre (not checked; any text other than 'info' or 'rft' works here)
set to nil to leave the identifier out of the COinS
separator: character or text between label and the identifier in the rendered citation
access: use this parameter to set the access level for all instances of this identifier.
the value must be a valid access level for an identifier (see ['id-access'] in this file).
custom_access: to enable custom access level for an identifier, set this parameter
to the parameter that should control it (normally 'id-access')
]]
local id_handlers = {
['ARXIV'] = {
parameters = {'arxiv', 'eprint'},
link = 'arXiv.org',
q = 'Q118398',
label = 'arXiv',
mode = 'manual',
prefix = '//arxiv.org/abs/', -- protocol relative tested 2013-09-04
encode = false,
COinS = 'info:arxiv',
separator = ':',
access = 'free', -- free to read
},
['ASIN'] = {
parameters = { 'asin', 'ASIN' },
link = 'Amazon Standard Identification Number', -- нет статьи
q = 'Q1753278',
label = 'ASIN',
mode = 'manual',
prefix = '//www.amazon.',
COinS = nil, -- no COinS for this id (needs thinking on implementation because |asin-tld=)
separator = ' ',
encode = false;
},
['BIBCODE'] = {
parameters = {'bibcode'},
link = 'Bibcode',
q = 'Q25754',
label = 'Bibcode',
mode = 'manual',
prefix = 'http://adsabs.harvard.edu/abs/',
encode = false,
COinS = 'info:bibcode',
separator = ':',
custom_access = 'bibcode-access',
},
['BIORXIV'] = {
parameters = {'biorxiv'},
link = 'bioRxiv', -- нет статьи
q = 'Q19835482',
label = 'bioRxiv',
mode = 'manual',
prefix = '//doi.org/10.1101/',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = ' ',
},
['CITESEERX'] = {
parameters = {'citeseerx'},
link = 'CiteSeerX',
q = 'Q2715061',
label = 'CiteSeerX',
mode = 'manual', -- manual for custom validation of the "doi"
prefix = '//citeseerx.ist.psu.edu/viewdoc/summary?doi=',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = ' ',
},
['DOI'] = {
parameters = { 'doi', 'DOI' },
link = 'Цифровой идентификатор объекта',
q = 'Q25670',
label = 'DOI',
mode = 'manual',
prefix = '//doi.org/',
COinS = 'info:doi',
separator = ':',
encode = true,
custom_access = 'doi-access',
},
['EISSN'] = {
parameters = {'eissn', 'EISSN'},
link = 'Международный стандартный серийный номер', -- нет в статье
q = 'Q46339674',
label = 'eISSN',
mode = 'manual',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.eissn',
encode = false,
separator = ' ',
},
['HDL'] = {
parameters = { 'hdl', 'HDL' },
link = 'Handle System', -- нет статьи
q = 'Q3126718',
label = 'HDL',
mode = 'manual',
prefix = '//hdl.handle.net/',
COinS = 'info:hdl',
separator = ':',
encode = true,
custom_access = 'hdl-access',
},
['ISBN'] = {
parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'},
link = 'Международный стандартный книжный номер',
q = 'Q33057',
label = 'ISBN',
mode = 'manual',
prefix = 'Special:BookSources/',
COinS = 'rft.isbn',
separator = ' ',
},
['ISMN'] = {
parameters = {'ismn', 'ISMN'},
link = 'Международный стандартный музыкальный номер',
q = 'Q1666938',
label = 'ISMN',
mode = 'manual',
prefix = '', -- not currently used;
COinS = 'nil', -- nil because we can't use pre or rft or info:
separator = ' ',
},
['ISSN'] = {
parameters = {'issn', 'ISSN'},
link = 'Международный стандартный серийный номер',
q = 'Q131276',
label = 'ISSN',
mode = 'manual',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.issn',
encode = false,
separator = ' ',
},
['JFM'] = {
parameters = {'jfm', 'JFM'},
link = 'Zentralblatt MATH#История', -- нет пояснений
q = '',
label = 'JFM',
mode = 'manual',
prefix = '//zbmath.org/?format=complete&q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
['JSTOR'] = {
parameters = {'jstor', 'JSTOR'},
link = 'JSTOR',
q = 'Q1420342',
label = 'JSTOR',
mode = 'external',
prefix = '//www.jstor.org/stable/', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
custom_access = 'jstor-access',
},
['LCCN'] = {
parameters = {'LCCN', 'lccn'},
link = 'Контрольный номер Библиотеки Конгресса',
q = 'Q620946',
label = 'LCCN',
mode = 'manual',
prefix = '//lccn.loc.gov/', -- protocol relative tested 2015-12-28
COinS = 'info:lccn', -- use prefix value
encode = false,
separator = ' ',
},
['MR'] = {
parameters = {'MR', 'mr'},
link = 'Mathematical Reviews',
q = 'Q211172',
label = 'MR',
mode = 'manual',
prefix = '//www.ams.org/mathscinet-getitem?mr=', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
['OCLC'] = {
parameters = {'OCLC', 'oclc'},
link = 'Online Computer Library Center#Базы данных онлайн',
q = 'Q190593',
label = 'OCLC',
mode = 'manual',
prefix = '//www.worldcat.org/oclc/',
COinS = 'info:oclcnum',
encode = true,
separator = ' ',
},
['OL'] = {
parameters = { 'ol', 'OL' },
link = 'Open Library',
q = 'Q1201876',
label = 'OL',
mode = 'manual',
prefix = '//openlibrary.org/',
COinS = nil, -- no COinS for this id (needs thinking on implementation because /authors/books/works/OL)
separator = ' ',
encode = true,
custom_access = 'ol-access',
},
['OSTI'] = {
parameters = {'OSTI', 'osti'},
link = 'Office of Scientific and Technical Information', -- нет статьи
q = 'Q2015776',
label = 'OSTI',
mode = 'external',
prefix = '//www.osti.gov/biblio/', -- protocol relative tested 2018-09-12
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
custom_access = 'osti-access',
},
['PMC'] = {
parameters = {'PMC', 'pmc'},
link = 'PubMed Central',
q = 'Q229883',
label = 'PMC',
mode = 'manual',
prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC',
suffix = " ",
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
access = 'free', -- free to read
},
['PMID'] = {
parameters = {'PMID', 'pmid'},
link = 'PMID',
q = '',
label = 'PMID',
mode = 'manual',
prefix = '//www.ncbi.nlm.nih.gov/pubmed/',
COinS = 'info:pmid',
encode = false,
separator = ' ',
},
['RFC'] = {
parameters = {'RFC', 'rfc'},
link = 'RFC',
q = 'Q212971',
label = 'RFC',
mode = 'external',
prefix = '//tools.ietf.org/html/rfc',
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
access = 'free', -- free to read
},
['S2CID'] = {
parameters = {'s2cid', 'S2CID'},
link = 'Semantic Scholar',
redirect = 'S2CID (identifier)',
q = 'Q22908627',
label = 'S2CID',
mode = 'external',
prefix = 'https://api.semanticscholar.org/CorpusID:',
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
id_limit = 250000000,
custom_access = 's2cid-access',
},
['SSRN'] = {
parameters = {'SSRN', 'ssrn'},
link = 'Social Science Research Network', -- нет статьи
q = 'Q7550801',
label = 'SSRN',
mode = 'manual',
prefix = '//ssrn.com/abstract=', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
access = 'free', -- always free to read
},
['USENETID'] = {
parameters = {'message-id'},
link = 'Usenet',
q = 'Q193162',
label = 'Usenet:',
mode = 'manual',
prefix = 'news:',
encode = false,
COinS = 'pre', -- use prefix value
separator = ' ',
},
['ZBL'] = {
parameters = {'ZBL', 'zbl'},
link = 'Zentralblatt MATH',
q = 'Q190269',
label = 'Zbl',
mode = 'manual',
prefix = '//zbmath.org/?format=complete&q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
}
--[[--------------------------< E X P O R T S >----------------------------------------------------------------
]]
return {
aliases = aliases,
special_case_translation = special_case_translation,
defaults = defaults,
date_names = date_names,
error_conditions = error_conditions,
id_handlers = id_handlers,
keywords = keywords,
stripmarkers=stripmarkers,
invisible_chars = invisible_chars,
indic_script = indic_script,
maint_cats = maint_cats,
messages = messages,
presentation = presentation,
prop_cats = prop_cats,
script_lang_codes = script_lang_codes,
lang_code_remap = lang_code_remap,
lang_name_remap = lang_name_remap,
title_types = title_types,
uncategorized_namespaces = uncategorized_namespaces,
uncategorized_subpages = uncategorized_subpages,
templates_using_volume = templates_using_volume,
templates_using_issue = templates_using_issue,
templates_not_using_page = templates_not_using_page,
}
d4da9196522a04f58f60bce529977bd12ad7f52c
19
13
2022-07-19T12:43:58Z
CyberTailor
2
update module
Scribunto
text/plain
local citation_config = {};
--[[--------------------------< U N C A T E G O R I Z E D _ N A M E S P A C E S >------------------------------
List of namespaces that should not be included in citation error categories. Same as setting notracking = true by default
Note: Namespace names should use underscores instead of spaces.
]]
local uncategorized_namespaces = { --[['Участник', закомментировано, т. к. тестируется на Участник:Vort/CJ]] 'Обсуждение', 'Обсуждение_участника', 'Обсуждение_Википедии', 'Обсуждение_файла', 'Обсуждение_шаблона', 'Обсуждение_категории', 'Обсуждение_портала', 'Обсуждение_модуля', 'Обсуждение_портала', 'Обсуждение_MediaWiki', 'Обсуждение_арбитража', 'Обсуждение_Инкубатора' };
local uncategorized_subpages = {'/[Ss]andbox', '/[Tt]estcases', '/[Пп]есочница', '/[Тт]есты'}; -- list of Lua patterns found in page names of pages we should not categorize
--[[--------------------------< M E S S A G E S >--------------------------------------------------------------
Translation table
The following contains fixed text that may be output as part of a citation.
This is separated from the main body to aid in future translations of this
module.
]]
local messages = {
['archived-dead'] = 'Архивировано из $1 $2',
['archived-not-dead'] = '$1 из оригинала $2',
['archived-missing'] = 'Архивировано из оригинала$1 $2',
['archived'] = 'Архивировано',
['by'] = 'By', -- contributions to authored works: introduction, foreword, afterword
['cartography'] = 'Cartography by $1',
['editor'] = 'ed.',
['editors'] = 'eds.',
['edition'] = '($1 ed.)',
['episode'] = 'Episode $1',
['et al'] = 'et al.',
['in'] = 'In', -- edited works
['inactive'] = 'inactive',
['inset'] = '$1 inset',
['interview'] = 'Interviewed by $1',
['lay summary'] = 'Lay summary',
['newsgroup'] = '[[Usenet newsgroup|Newsgroup]]: $1',
['original'] = 'оригинала',
['published'] = ' (published $1)',
['retrieved'] = 'Дата обращения $1',
['season'] = 'Season $1',
['section'] = '§ $1',
['sections'] = '§§ $1',
['series'] = 'Series $1',
['translated'] = 'Translated by $1',
['type'] = ' ($1)', -- for titletype
['written'] = 'Written at $1',
['vol'] = '$1 Vol. $2', -- $1 is sepc; bold journal style volume is in presentation{}
['vol-no'] = '$1 Vol. $2 no. $3', -- sepc, volume, issue
['issue'] = '$1 No. $2', -- $1 is sepc
['j-vol'] = '$1 $2', -- sepc, volume; bold journal volume is in presentation{}
['j-issue'] = ' ($1)',
['nopp'] = '$1 $2'; -- page(s) without prefix; $1 is sepc
['p-prefix'] = "$1 p. $2", -- $1 is sepc
['pp-prefix'] = "$1 pp. $2", -- $1 is sepc
['j-page(s)'] = ': $1', -- same for page and pages
['sheet'] = '$1 Sheet $2', -- $1 is sepc
['sheets'] = '$1 Sheets $2', -- $1 is sepc
['j-sheet'] = ': Sheet $1',
['j-sheets'] = ': Sheets $1',
['subscription'] = '<span class="cs1-subscription">(Subscription required (<span title="The site requires a paid subscription to access this page.">help</span>))</span>',
-- '[[Category:Pages containing links to subscription-only content]]',
['registration']='<span class="cs1-registration">(Registration required (<span title="The site requires registration to access this page.">help</span>))</span>',
-- '[[Category:Pages with login required references or sources]]',
['language'] = '[$1]',
['via'] = " – via $1",
['event'] = 'Event occurs at',
['minutes'] = 'minutes in',
['parameter-separator'] = ', ',
['parameter-final-separator'] = ' и ',
['parameter-pair-separator'] = ' и ',
-- Determines the location of the help page
['help page link'] = 'Википедия:Ошибки шаблонов CS1/2',
['help page label'] = 'справка',
-- Internal errors (should only occur if configuration is bad)
['undefined_error'] = 'Called with an undefined error condition',
['unknown_manual_ID'] = 'Unrecognized manual ID mode',
['unknown_ID_mode'] = 'Unrecognized ID mode',
['unknown_argument_map'] = 'Argument map not defined for this variable',
['bare_url_no_origin'] = 'Bare url found but origin indicator is nil or empty',
}
--[[--------------------------< P R E S E N T A T I O N >------------------------------------------------------
Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically
correct place.
]]
local presentation =
{
-- Error output
-- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538
-- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display
['hidden-error'] = '<span class="cs1-hidden-error error citation-comment">$1</span>',
['visible-error'] = '<span class="cs1-visible-error error citation-comment">$1</span>',
['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal css
['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like
['cite'] = '<cite class="$1">$2</cite>'; -- |ref= not set so no id="..." attribute
['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- for use when |ref= is set
['format'] = ' <span class="cs1-format">($1)</span>', -- for |format=, |chapter-format=, etc
-- various access levels, for |access=, |doi-access=, |arxiv=, ...
-- narrow no-break space   may work better than nowrap css. Or not? browser support?
['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>', -- external link with appropriate lock icon
['free'] = {class='cs1-lock-free', title='Freely accessible'}, -- classes defined in Module:Citation/CS1/styles.css
['registration'] = {class='cs1-lock-registration', title='Free registration required'},
['limited'] = {class='cs1-lock-limited', title='Free access subject to limited trial, subscription normally required'},
['subscription'] = {class='cs1-lock-subscription', title='Paid subscription required'},
['italic-title'] = "''$1''",
['kern-left'] = '<span class="cs1-kern-left">$1</span>$2', -- spacing to use when title contains leading single or double quote mark
['kern-right'] = '$1<span class="cs1-kern-right">$2</span>', -- spacing to use when title contains trailing single or double quote mark
-- these for simple wikilinked titles [["text]], [[text"]] and [["text"]]
-- span wraps entire wikilink
['kern-wl-left'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains leading single or double quote mark
['kern-wl-right'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains trailing single or double quote mark
['kern-wl-both'] = '<span class="cs1-kern-wl-left cs1-kern-wl-right">$1</span>', -- when title contains leading and trailing single or double quote marks
['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span>
['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space)
['ocins'] = '<span title="$1" class="Z3988"></span>',
['parameter'] = '<code class="cs1-code">|$1=</code>',
['ps_cs1'] = '.'; -- cs1 style postscript (terminal) character
['ps_cs2'] = ''; -- cs2 style postscript (terminal) character (empty string)
['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content
['quoted-title'] = '“$1”',
['sep_cs1'] = '.', -- cs1 element separator
['sep_cs2'] = ',', -- cs2 separator
['sep_nl'] = ';', -- cs1|2 style name-list separator between authors is a semicolon
['sep_name'] = ', ', -- cs1|2 style last/first separator is <comma><space>
['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma
['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space
['trans-italic-title'] = "[''$1'']",
['trans-quoted-title'] = "[$1]",
['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{}
}
--[[--------------------------< A L I A S E S >----------------------------------------------------------------
Aliases table for commonly passed parameters
]]
local aliases = {
['AccessDate'] = {'access-date', 'accessdate'},
['Agency'] = 'agency',
['AirDate'] = {'air-date', 'airdate'},
['ArchiveDate'] = {'archive-date', 'archivedate'},
['ArchiveFormat'] = 'archive-format',
['ArchiveURL'] = {'archive-url', 'archiveurl'},
['ASINTLD'] = {'ASIN-TLD', 'asin-tld'},
['At'] = 'at',
['Authors'] = {'authors', 'people', 'host', 'credits'},
['BookTitle'] = {'book-title', 'booktitle'},
['Cartography'] = 'cartography',
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},
['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'};
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'entry-url', 'article-url', 'section-url', 'sectionurl'},
['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'},
['Class'] = 'class', -- cite arxiv and arxiv identifiers
['Coauthors'] = {'coauthors', 'coauthor' }, -- для рувики (а вообще депрекированный)
['Collaboration'] = 'collaboration',
['Conference'] = {'conference', 'event'},
['ConferenceFormat'] = {'conference-format', 'event-format'},
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'},
['Contribution'] = 'contribution', -- introduction, foreword, afterword, etc; required when |contributor= set
['Date'] = 'date',
['DeadURL'] = {'deadlink', 'dead-url', 'deadurl'}, -- для рувики (TODO: перепроверить)
['Degree'] = 'degree',
['DF'] = 'df',
['DisplayAuthors'] = {'display-authors', 'displayauthors'},
['DisplayEditors'] = {'display-editors', 'displayeditors'},
['Docket'] = 'docket',
['DoiBroken'] = {'doi-broken', 'doi-broken-date', 'doi-inactive-date'},
['Edition'] = 'edition',
['Editors'] = 'editors',
['Embargo'] = 'embargo',
['Encyclopedia'] = {'encyclopedia', 'encyclopaedia'}, -- this one only used by citation
['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode?
['Format'] = 'format',
['ID'] = {'id', 'ID'},
['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'},
['Inset'] = 'inset',
['Issue'] = {'issue', 'number'},
['Interviewers'] = 'interviewers',
['Language'] = {'language', 'lang'},
['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp'},
['LayDate'] = {'lay-date', 'laydate'},
['LayFormat'] = 'lay-format',
['LaySource'] = {'lay-source', 'laysource'},
['LayURL'] = {'lay-url', 'lay-summary', 'layurl', 'laysummary'},
['MailingList'] = {'mailinglist', 'mailing-list'}, -- cite mailing list only
['Map'] = 'map', -- cite map only
['MapFormat'] = 'map-format', -- cite map only
['MapURL'] = {'mapurl', 'map-url'}, -- cite map only
['MessageID'] = 'message-id',
['Minutes'] = 'minutes',
['Mode'] = 'mode',
['Month'] = 'month', -- для рувики (а вообще депрекированный)
['NameListFormat'] = 'name-list-format',
['Network'] = 'network',
['NoPP'] = {'no-pp', 'nopp'},
['NoTracking'] = {'template-doc-demo', 'no-cat', 'nocat',
'no-tracking', 'notracking'},
['Number'] = 'number', -- this case only for cite techreport
['OrigYear'] = {'orig-year', 'origyear'},
['Others'] = 'others',
['Page'] = {'p', 'page'},
['Pages'] = {'pp', 'pages'},
['Periodical'] = {'journal', 'newspaper', 'magazine', 'work',
'website', 'periodical', 'encyclopedia', 'encyclopaedia', 'dictionary', 'mailinglist'},
['Place'] = {'place', 'location'},
['PostScript'] = 'postscript',
['PublicationDate'] = {'publicationdate', 'publication-date'},
['PublicationPlace'] = {'publication-place', 'publicationplace'},
['PublisherName'] = {'publisher', 'distributor', 'institution', 'newsgroup'},
['Quote'] = {'quote', 'quotation'},
['Ref'] = 'ref',
['RegistrationRequired'] = 'registration',
['Scale'] = 'scale',
['ScriptChapter'] = 'script-chapter',
['ScriptTitle'] = 'script-title',
['Section'] = 'section',
['Season'] = 'season',
['Sections'] = 'sections', -- cite map only
['Series'] = {'series', 'version'},
['SeriesSeparator'] = 'series-separator',
['SeriesLink'] = {'series-link', 'serieslink'},
['SeriesNumber'] = {'series-number', 'series-no', 'seriesnumber', 'seriesno'},
['Sheet'] = 'sheet', -- cite map only
['Sheets'] = 'sheets', -- cite map only
['Station'] = 'station',
['SubscriptionRequired'] = 'subscription',
['Time'] = 'time',
['TimeCaption'] = {'time-caption', 'timecaption'},
['Title'] = 'title',
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'},
['TitleNote'] = 'department',
['TitleType'] = {'type', 'medium'},
['TransChapter'] = 'trans-chapter',
['TransMap'] = 'trans-map', -- cite map only
['Transcript'] = 'transcript',
['TranscriptFormat'] = 'transcript-format',
['TranscriptURL'] = {'transcript-url', 'transcripturl'},
['TransTitle'] = 'trans-title',
['URL'] = {'url', 'URL'},
['UrlAccess'] = {'url-access'},
['Vauthors'] = 'vauthors',
['Veditors'] = 'veditors',
['Via'] = 'via',
['Volume'] = 'volume',
['Year'] = 'year',
['AuthorList-First'] = {"first#", "given#", "author-first#", "author#-first"},
['AuthorList-Last'] = {"last#", "author#", "surname#", "author-last#", "author#-last", "subject#"},
['AuthorList-Link'] = {"authorlink#", "author-link#", "author#-link", "subjectlink#", "author#link", "subject-link#", "subject#-link", "subject#link"},
['AuthorList-Mask'] = {"author-mask#", "authormask#", "author#mask", "author#-mask"},
['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given'},
['ContributorList-Last'] = {'contributor#', 'contributor-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname'},
['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'},
['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'},
['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"},
['EditorList-Last'] = {"editor#", "editor-last#", "editor#-last", "editor-surname#", "editor#-surname"},
['EditorList-Link'] = {"editor-link#", "editor#-link", "editorlink#", "editor#link"},
['EditorList-Mask'] = {"editor-mask#", "editor#-mask", "editormask#", "editor#mask"},
['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first'},
['InterviewerList-Last'] = {'interviewer#', 'interviewer-last#', 'interviewer#-last'},
['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'},
['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'},
['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given'},
['TranslatorList-Last'] = {'translator#', 'translator-last#', 'translator#-last', 'translator-surname#', 'translator#-surname'},
['TranslatorList-Link'] = {'translator-link#', 'translator#-link'},
['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'},
}
--[[--------------------------< S P E C I A L C A S E T R A N S L A T I O N S >----------------------------
This table is primarily here to support internationalization. Translations in this table are used, for example,
when an error message, category name, etc is extracted from the English alias key. There may be other cases where
this translation table may be useful.
]]
local special_case_translation = {
['AuthorList'] = "authors list", -- these for multiple names maint categories
['ContributorList'] = "contributors list",
['EditorList'] = "editors list",
['InterviewerList'] = "interviewers list",
['TranslatorList'] = "translators list",
['authors'] = "authors", -- used in get_display_authors_editors()
['editors'] = "editors",
['archived_copy'] = '^archived?%s+copy$', -- lua pattern to match pseudo title used by Internet Archive bot and others as place holder for unknown |title= value
-- used with CS1 maint: Archived copy as title
}
--[=[-------------------------< E T _ A L _ P A T T E R N S >--------------------------------------------------
This table provides Lua patterns for the phrase "et al" and variants in name text
(author, editor, etc.). The main module uses these to identify and emit the 'etal' message.
]=]
local et_al_patterns = {
"[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][%.\"']*$", -- variations on the 'et al' theme
"[;,]? *[\"']*%f[%a][Ee][Tt]%.? *[Aa][Ll][Ii][Aa][%.\"']*$", -- variations on the 'et alia' theme
"[;,]? *%f[%a]and [Oo]thers", -- and alternate to et al.
"%[%[ *[Ee][Tt]%.? *[Aa][Ll]%.? *%]%]", -- a wikilinked form
"[%(%[] *[Ee][Tt]%.? *[Aa][Ll]%.? *[%)%]]", -- a bracketed form
}
--[[--------------------------< E D I T O R _ M A R K U P _ P A T T E R N S >----------------------------------
This table provides Lua patterns for the phrase "ed" and variants in name text
(author, editor, etc.). The main module uses these to identify and emit the
'extra_text_names' message. (It is not the only series of patterns for this message.)
]]
local editor_markup_patterns = { -- these patterns match annotations at end of name
'%f[%(%[][%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]?$', -- (ed) or (eds): leading '(', case insensitive 'ed', optional 's', '.' and/or ')'
'[,%.%s]%f[e]eds?%.?$', -- ed or eds: without '('or ')'; case sensitive (ED could be initials Ed could be name)
'%f[%(%[][%(%[]%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?%s*[%)%]]?$', -- (editor) or (editors): leading '(', case insensitive, optional '.' and/or ')'
'[,%.%s]%f[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?$', -- editor or editors: without '('or ')'; case insensitive
-- these patterns match annotations at beginning of name
'^eds?[%.,;]', -- ed. or eds.: lower case only, optional 's', requires '.'
'^[%(%[]%s*[Ee][Dd][Ss]?%.?%s*[%)%]]', -- (ed) or (eds): also sqare brackets, case insensitive, optional 's', '.'
'^[%(%[]?%s*[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%A', -- (editor or (editors: also sq brackets, case insensitive, optional brackets, 's'
'^[%(%[]?%s*[Ee][Dd][Ii][Tt][Ee][Dd]%A', -- (edited: also sq brackets, case insensitive, optional brackets
-- these patterns match annotations that are the 'name'
'^[Ee][Dd][Ii][Tt][Oo][Rr][Ss]?%.?$', -- editor or editors; case insensitive
}
--[[--------------------------< P R E S E N T A T I O N >------------------------------------------------------
Fixed presentation markup. Originally part of citation_config.messages it has been moved into its own, more semantically
correct place.
]]
local presentation =
{
-- Error output
-- .error class is specified at https://git.wikimedia.org/blob/mediawiki%2Fcore.git/9553bd02a5595da05c184f7521721fb1b79b3935/skins%2Fcommon%2Fshared.css#L538
-- .citation-comment class is specified at Help:CS1_errors#Controlling_error_message_display
['hidden-error'] = '<span class="cs1-hidden-error error citation-comment">$1</span>',
['visible-error'] = '<span class="cs1-visible-error error citation-comment">$1</span>',
['hidden-maint'] = '<span class="cs1-maint citation-comment">$1</span>',
['accessdate'] = '<span class="reference-accessdate">$1$2</span>', -- to allow editors to hide accessdate using personal css
['bdi'] = '<bdi$1>$2</bdi>', -- bidirectional isolation used with |script-title= and the like
['cite'] = '<cite class="$1">$2</cite>'; -- |ref= not set so no id="..." attribute
['cite-id'] = '<cite id="$1" class="$2">$3</cite>'; -- for use when |ref= is set
['format'] = ' <span class="cs1-format">($1)</span>', -- for |format=, |chapter-format=, etc
-- various access levels, for |access=, |doi-access=, |arxiv=, ...
-- narrow no-break space   may work better than nowrap css. Or not? browser support?
['ext-link-access-signal'] = '<span class="$1" title="$2">$3</span>', -- external link with appropriate lock icon
['free'] = {class='cs1-lock-free', title='Freely accessible'}, -- classes defined in Module:Citation/CS1/styles.css
['registration'] = {class='cs1-lock-registration', title='Free registration required'},
['limited'] = {class='cs1-lock-limited', title='Free access subject to limited trial, subscription normally required'},
['subscription'] = {class='cs1-lock-subscription', title='Paid subscription required'},
['interwiki-icon'] = '<span class="$1" title="$2">$3</span>',
['class-wikisource'] = 'cs1-ws-icon',
['italic-title'] = "''$1''",
['kern-left'] = '<span class="cs1-kern-left">$1</span>$2', -- spacing to use when title contains leading single or double quote mark
['kern-right'] = '$1<span class="cs1-kern-right">$2</span>', -- spacing to use when title contains trailing single or double quote mark
-- these for simple wikilinked titles [["text]], [[text"]] and [["text"]]
-- span wraps entire wikilink
['kern-wl-left'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains leading single or double quote mark
['kern-wl-right'] = '<span class="cs1-kern-wl-left">$1</span>', -- when title contains trailing single or double quote mark
['kern-wl-both'] = '<span class="cs1-kern-wl-left cs1-kern-wl-right">$1</span>', -- when title contains leading and trailing single or double quote marks
['nowrap1'] = '<span class="nowrap">$1</span>', -- for nowrapping an item: <span ...>yyyy-mm-dd</span>
['nowrap2'] = '<span class="nowrap">$1</span> $2', -- for nowrapping portions of an item: <span ...>dd mmmm</span> yyyy (note white space)
['ocins'] = '<span title="$1" class="Z3988"></span>',
['parameter'] = '<code class="cs1-code">|$1=</code>',
['ps_cs1'] = '.'; -- cs1 style postscript (terminal) character
['ps_cs2'] = ''; -- cs2 style postscript (terminal) character (empty string)
['quoted-text'] = '<q>$1</q>', -- for wrapping |quote= content
['quoted-title'] = '"$1"',
['sep_cs1'] = '.', -- cs1 element separator
['sep_cs2'] = ',', -- cs2 separator
['sep_nl'] = ';', -- cs1|2 style name-list separator between authors is a semicolon
['sep_name'] = ', ', -- cs1|2 style last/first separator is <comma><space>
['sep_nl_vanc'] = ',', -- Vancouver style name-list separator between authors is a comma
['sep_name_vanc'] = ' ', -- Vancouver style last/first separator is a space
['trans-italic-title'] = "[''$1'']",
['trans-quoted-title'] = "[$1]",
['vol-bold'] = '$1 <b>$2</b>', -- sepc, volume; for bold journal cites; for other cites ['vol'] in messages{}
}
--[[--------------------------< A L I A S E S >----------------------------------------------------------------
Aliases table for commonly passed parameters
]]
local aliases = {
['AccessDate'] = {'access-date', 'accessdate'}, -- (Used by InternetArchiveBot)
['Agency'] = 'agency',
['AirDate'] = {'air-date', 'airdate'},
['ArchiveDate'] = {'archive-date', 'archivedate'}, -- (Used by InternetArchiveBot)
['ArchiveFormat'] = 'archive-format',
['ArchiveURL'] = {'archive-url', 'archiveurl'}, -- (Used by InternetArchiveBot)
['ASINTLD'] = 'asin-tld',
['At'] = 'at', -- (Used by InternetArchiveBot)
['Authors'] = {'authors', 'people', 'credits'},
['BookTitle'] = {'book-title', 'booktitle'},
['Cartography'] = 'cartography',
['Chapter'] = {'chapter', 'contribution', 'entry', 'article', 'section'},
['ChapterFormat'] = {'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'};
['ChapterURL'] = {'chapter-url', 'chapterurl', 'contribution-url', 'contributionurl', 'entry-url', 'article-url', 'section-url', 'sectionurl'}, -- (Used by InternetArchiveBot)
['ChapterUrlAccess'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'}, -- (Used by InternetArchiveBot)
['Class'] = 'class', -- cite arxiv and arxiv identifiers
['Collaboration'] = 'collaboration',
['Conference'] = {'conference', 'event'},
['ConferenceFormat'] = {'conference-format', 'event-format'},
['ConferenceURL'] = {'conference-url', 'conferenceurl', 'event-url', 'eventurl'}, -- (Used by InternetArchiveBot)
['Contribution'] = 'contribution', -- introduction, foreword, afterword, etc; required when |contributor= set
['Date'] = 'date',
['Degree'] = 'degree',
['DF'] = 'df',
['DisplayAuthors'] = {'display-authors', 'displayauthors'},
['DisplayContributors'] = 'display-contributors',
['DisplayEditors'] = {'display-editors', 'displayeditors'},
['DisplayInterviewers'] = 'display-interviewers',
['DisplayTranslators'] = 'display-translators',
['Docket'] = 'docket',
['DoiBroken'] = {'doi-broken', 'doi-broken-date', 'doi-inactive-date'},
['Edition'] = 'edition',
['Editors'] = 'editors',
['Embargo'] = 'embargo',
['Encyclopedia'] = {'encyclopedia', 'encyclopaedia'}, -- this one only used by citation
['Episode'] = 'episode', -- cite serial only TODO: make available to cite episode?
['Format'] = 'format',
['ID'] = {'id', 'ID'},
['IgnoreISBN'] = {'ignore-isbn-error', 'ignoreisbnerror'},
['Inset'] = 'inset',
['Issue'] = {'issue', 'number'},
['Language'] = {'language', 'lang'},
['LastAuthorAmp'] = {'last-author-amp', 'lastauthoramp'},
['LayDate'] = {'lay-date', 'laydate'},
['LayFormat'] = 'lay-format',
['LaySource'] = {'lay-source', 'laysource'},
['LayURL'] = {'lay-url', 'layurl'}, -- (Used by InternetArchiveBot)
['MailingList'] = {'mailinglist', 'mailing-list'}, -- cite mailing list only
['Map'] = 'map', -- cite map only
['MapFormat'] = 'map-format', -- cite map only
['MapURL'] = {'mapurl', 'map-url'}, -- cite map only -- (Used by InternetArchiveBot)
['MapUrlAccess'] = 'map-url-access', -- cite map only -- (Used by InternetArchiveBot)
['MessageID'] = 'message-id',
['Minutes'] = 'minutes',
['Mode'] = 'mode',
['NameListFormat'] = 'name-list-format',
['Network'] = 'network',
['NoPP'] = {'no-pp', 'nopp'},
['NoTracking'] = {'template-doc-demo', 'no-cat', 'nocat',
'no-tracking', 'notracking'},
['Number'] = 'number', -- this case only for cite techreport
['OrigYear'] = {'orig-year', 'origyear'},
['Others'] = 'others',
['Page'] = {'p', 'page'}, -- (Used by InternetArchiveBot)
['Pages'] = {'pp', 'pages'}, -- (Used by InternetArchiveBot)
['Periodical'] = {'journal', 'magazine', 'newspaper', 'periodical', 'website', 'work',
'encyclopedia', 'encyclopaedia', 'dictionary', 'mailinglist'}, -- these masquerade as periodicals but aren't TODO: find a better way to handle these?
['Place'] = {'place', 'location'},
['PostScript'] = 'postscript',
['PublicationDate'] = {'publicationdate', 'publication-date'},
['PublicationPlace'] = {'publication-place', 'publicationplace'},
['PublisherName'] = {'publisher', 'institution', 'newsgroup'},
['Quote'] = {'quote', 'quotation'},
['Ref'] = 'ref',
['Scale'] = 'scale',
['ScriptChapter'] = {'script-chapter', 'script-contribution', 'script-entry', 'script-article', 'script-section'},
['ScriptMap'] = 'script-map',
['ScriptPeriodical'] = {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-website', 'script-work'},
['ScriptTitle'] = 'script-title', -- (Used by InternetArchiveBot)
['Section'] = 'section',
['Season'] = 'season',
['Sections'] = 'sections', -- cite map only
['Series'] = {'series', 'version'},
['SeriesSeparator'] = 'series-separator',
['SeriesLink'] = {'series-link', 'serieslink'},
['SeriesNumber'] = {'series-number', 'series-no', 'seriesnumber', 'seriesno'},
['Sheet'] = 'sheet', -- cite map only
['Sheets'] = 'sheets', -- cite map only
['Station'] = 'station',
['Time'] = 'time',
['TimeCaption'] = {'time-caption', 'timecaption'},
['Title'] = 'title', -- (Used by InternetArchiveBot)
['TitleLink'] = {'title-link', 'episode-link', 'titlelink', 'episodelink'}, -- (Used by InternetArchiveBot)
['TitleNote'] = 'department',
['TitleType'] = {'type', 'medium'},
['TransChapter'] = {'trans-article', 'trans-chapter', 'trans-contribution', 'trans-entry', 'trans-section'},
['Transcript'] = 'transcript',
['TranscriptFormat'] = 'transcript-format',
['TranscriptURL'] = {'transcript-url', 'transcripturl'}, -- (Used by InternetArchiveBot)
['TransMap'] = 'trans-map', -- cite map only
['TransPeriodical'] = {'trans-journal', 'trans-magazine', 'trans-newspaper', 'trans-periodical', 'trans-website', 'trans-work'},
['TransTitle'] = 'trans-title', -- (Used by InternetArchiveBot)
['URL'] = {'url', 'URL'}, -- (Used by InternetArchiveBot)
['UrlAccess'] = {'url-access'}, -- (Used by InternetArchiveBot)
['UrlStatus'] = 'url-status', -- (Used by InternetArchiveBot)
['Vauthors'] = 'vauthors',
['Veditors'] = 'veditors',
['Via'] = 'via',
['Volume'] = 'volume',
['Year'] = 'year',
['AuthorList-First'] = {"first#", "given#", "author-first#", "author#-first"},
['AuthorList-Last'] = {"last#", "author#", "surname#", "author-last#", "author#-last", "subject#", 'host#'},
['AuthorList-Link'] = {"authorlink#", "author-link#", "author#-link", "subjectlink#", "author#link", "subject-link#", "subject#-link", "subject#link"},
['AuthorList-Mask'] = {"author-mask#", "authormask#", "author#mask", "author#-mask"},
['ContributorList-First'] = {'contributor-first#', 'contributor#-first', 'contributor-given#', 'contributor#-given'},
['ContributorList-Last'] = {'contributor#', 'contributor-last#', 'contributor#-last', 'contributor-surname#', 'contributor#-surname'},
['ContributorList-Link'] = {'contributor-link#', 'contributor#-link'},
['ContributorList-Mask'] = {'contributor-mask#', 'contributor#-mask'},
['EditorList-First'] = {"editor-first#", "editor#-first", "editor-given#", "editor#-given"},
['EditorList-Last'] = {"editor#", "editor-last#", "editor#-last", "editor-surname#", "editor#-surname"},
['EditorList-Link'] = {"editor-link#", "editor#-link", "editorlink#", "editor#link"},
['EditorList-Mask'] = {"editor-mask#", "editor#-mask", "editormask#", "editor#mask"},
['InterviewerList-First'] = {'interviewer-first#', 'interviewer#-first'},
['InterviewerList-Last'] = {'interviewer#', 'interviewer-last#', 'interviewer#-last'},
['InterviewerList-Link'] = {'interviewer-link#', 'interviewer#-link'},
['InterviewerList-Mask'] = {'interviewer-mask#', 'interviewer#-mask'},
['TranslatorList-First'] = {'translator-first#', 'translator#-first', 'translator-given#', 'translator#-given'},
['TranslatorList-Last'] = {'translator#', 'translator-last#', 'translator#-last', 'translator-surname#', 'translator#-surname'},
['TranslatorList-Link'] = {'translator-link#', 'translator#-link'},
['TranslatorList-Mask'] = {'translator-mask#', 'translator#-mask'},
}
--[[--------------------------< P U N C T _ S K I P >----------------------------------------------------------
builds a table of parameter names that the extraneous terminal punctuation check should not check.
]]
local punct_skip = {};
local meta_params = { -- table of aliases[] keys (meta parameters); each key has a table of parameter names for a value
'BookTitle', 'Chapter', 'ScriptChapter', 'ScriptTitle', 'Title', 'TransChapter', 'Transcript', 'TransMap', 'TransTitle', -- title-holding parameters
'PostScript', 'Quote', -- miscellaneous
'ArchiveURL', 'ChapterURL', 'ConferenceURL', 'LayURL', 'MapURL', 'TranscriptURL', 'URL', -- url-holding parameters
}
for _, meta_param in ipairs (meta_params) do -- for each meta parameter key
local params = aliases[meta_param]; -- get the parameter or the table of parameters associated with the meta parameter name
if 'string' == type (params) then
punct_skip[params] = 1; -- just a single parameter
else
for _, param in ipairs (params) do -- get the parameter name
punct_skip[param] = 1; -- add the parameter name to the skip table
end
end
end
--[[--------------------------< S P E C I A L C A S E T R A N S L A T I O N S >----------------------------
This table is primarily here to support internationalization. Translations in this table are used, for example,
when an error message, category name, etc is extracted from the English alias key. There may be other cases where
this translation table may be useful.
]]
local special_case_translation = {
['AuthorList'] = 'authors list', -- these for multiple names maint categories
['ContributorList'] = 'contributors list',
['EditorList'] = 'editors list',
['InterviewerList'] = 'interviewers list',
['TranslatorList'] = 'translators list',
['authors'] = 'authors', -- used in get_display_names()
['contributors'] = 'contributors',
['editors'] = 'editors',
['interviewers'] = 'interviewers',
['translators'] = 'translators',
['archived_copy'] = '^archived?%s+copy$', -- lua pattern to match pseudo title used by Internet Archive bot and others as place holder for unknown |title= value
-- used with CS1 maint: Archived copy as title
}
--[[--------------------------< D E F A U L T S >--------------------------------------------------------------
Default parameter values
TODO: keep this? Only one default?
]]
local defaults = {
['UrlStatus'] = 'dead', -- (Used by InternetArchiveBot)
}
--[[--------------------------< D A T E _ N A M E S >----------------------------------------------------------
This table of tables lists local language date names and fallback English date names. The code in Date_validation
will look first in the local table for valid date names. If date names are not found in the local table, the code
will look in the English table.
Because citations can be copied to the local wiki from en.wiki, the English is required when the date-name translation
function date_name_xlate() is used.
In these tables, season numbering is defined by ISO DIS 8601:2016 part 2 §4.7 'Divisions of a year'. The standard
defines various divisions using numbers 21-41. cs1|2 only supports generic seasons. ISO DIS 8601:2016 does support
the distinction between north and south hemispere seasons but cs1|2 has no way to make that distinction.
The standard does not address 'named' dates so, for the purposes of cs1|2, Christmas is defined here as 99, which
should be out of the ISO DIS 8601:2016 range of uses for a while.
]]
local date_names = {
['en'] = { -- English
['long'] = {['January']=1, ['February']=2, ['March']=3, ['April']=4, ['May']=5, ['June']=6, ['July']=7, ['August']=8, ['September']=9, ['October']=10, ['November']=11, ['December']=12},
['short'] = {['Jan']=1, ['Feb']=2, ['Mar']=3, ['Apr']=4, ['May']=5, ['Jun']=6, ['Jul']=7, ['Aug']=8, ['Sep']=9, ['Oct']=10, ['Nov']=11, ['Dec']=12},
['season'] = {['Winter']=24, ['Spring']=21, ['Summer']=22, ['Fall']=23, ['Autumn']=23},
['named'] = {['Christmas']=99},
},
['local'] = { -- replace these English date names with the local language equivalents
['long'] = {['January']=1, ['February']=2, ['March']=3, ['April']=4, ['May']=5, ['June']=6, ['July']=7, ['August']=8, ['September']=9, ['October']=10, ['November']=11, ['December']=12},
['short'] = {['Jan']=1, ['Feb']=2, ['Mar']=3, ['Apr']=4, ['May']=5, ['Jun']=6, ['Jul']=7, ['Aug']=8, ['Sep']=9, ['Oct']=10, ['Nov']=11, ['Dec']=12},
['season'] = {['Winter']=24, ['Spring']=21, ['Summer']=22, ['Fall']=23, ['Autumn']=23},
['named'] = {['Christmas']=99},
},
['inv_local_l'] = {}, -- used in date reformatting; copy of date_names['local'].long where k/v are inverted: [1]='<local name>' etc
['inv_local_s'] = {}, -- used in date reformatting; copy of date_names['local'].short where k/v are inverted: [1]='<local name>' etc
['local_digits'] = {['0'] = '0', ['1'] = '1', ['2'] = '2', ['3'] = '3', ['4'] = '4', ['5'] = '5', ['6'] = '6', ['7'] = '7', ['8'] = '8', ['9'] = '9'}, -- used to convert local language digits to Western 0-9
['xlate_digits'] = {},
}
for name, i in pairs (date_names['local'].long) do -- this table is ['name'] = i
date_names['inv_local_l'][i] = name; -- invert to get [i] = 'name' for conversions from ymd
end
for name, i in pairs (date_names['local'].short) do -- this table is ['name'] = i
date_names['inv_local_s'][i] = name; -- invert to get [i] = 'name' for conversions from ymd
end
for ld, ed in pairs (date_names.local_digits) do -- make a digit translation table for simple date translation from en to local language using local_digits table
date_names.xlate_digits [ed] = ld; -- en digit becomes index with local digit as the value
end
local df_template_patterns = { -- table of redirects to {{Use dmy dates}} and {{Use mdy dates}}
'{{ *[Uu]se (dmy) dates *[|}]', -- 915k -- sorted by approximate transclusion count
'{{ *[Uu]se *(mdy) *dates *[|}]', -- 161k
'{{ *[Uu]se (DMY) dates *[|}]', -- 2929
'{{ *[Uu]se *(dmy) *[|}]', -- 250 + 34
'{{ *([Dd]my) *[|}]', -- 272
'{{ *[Uu]se (MDY) dates *[|}]', -- 173
'{{ *[Uu]se *(mdy) *[|}]', -- 59 + 12
'{{ *([Mm]dy) *[|}]', -- 9
'{{ *[Uu]se (MDY) *[|}]', -- 3
'{{ *([Dd]MY) *[|}]', -- 2
'{{ *([Mm]DY) *[|}]', -- 0
-- '{{ *[Uu]se(mdy) *[|}]',
-- '{{ *[Uu]se(mdy)dates *[|}]',
-- '{{ *[Uu]se(dmy) *[|}]',
}
local function get_date_format ()
local content = mw.title.getCurrentTitle():getContent() or ''; -- get the content of the article or ''; new pages edited w/ve do not have 'content' until saved; ve does not preview; phab:T221625
for _, pattern in ipairs (df_template_patterns) do -- loop through the patterns looking for {{Use dmy dates}} or {{Use mdy dates}} or any of their redirects
local start, _, match = content:find(pattern); -- match is the three letters indicating desired date format
if match then
content = content:match ('%b{}', start); -- get the whole template
if content:match ('| *cs1%-dates *= *[lsy][sy]?') then -- look for |cs1-dates=publication date length access-/archive-date length
return match:lower() .. '-' .. content:match ('| *cs1%-dates *= *([lsy][sy]?)');
else
return match:lower() .. '-all'; -- no |cs1-dates= k/v pair; return value appropriate for use in |df=
end
end
end
end
local global_df = get_date_format ();
--[[--------------------------< V O L U M E , I S S U E , P A G E S >----------------------------------------
These tables hold cite class values (from the template invocation) and identify those templates that support
|volume=, |issue=, and |page(s)= parameters. Cite conference and cite map require further qualification which
is handled in the main module.
]]
local templates_using_volume = {'citation', 'audio-visual', 'book', 'conference', 'encyclopaedia', 'interview', 'journal', 'magazine', 'map', 'news', 'report', 'techreport', 'thesis'}
local templates_using_issue = {'citation', 'conference', 'episode', 'interview', 'journal', 'magazine', 'map', 'news', 'podcast'}
local templates_not_using_page = {'audio-visual', 'episode', 'mailinglist', 'newsgroup', 'podcast', 'serial', 'sign', 'speech'}
--[[--------------------------< K E Y W O R D S >--------------------------------------------------------------
These tables hold keywords for those parameters that have defined sets of acceptible keywords.
]]
--[[--------------------------< M A K E _ K E Y W O R D S _ L I S T >------------------------------------------
this function assembles, for parameter-value validation, the list of keywords appropriate to that parameter.
keywords_lists{}, is a table of tables from keywords{}
]]
local function make_keywords_list (keywords_lists)
local out_table = {}; -- output goes here
for _, keyword_list in ipairs (keywords_lists) do -- spin through keywords_lists{} and get a table of keywords
for _, keyword in ipairs (keyword_list) do -- spin through keyword_list{} and add each keyword, ...
table.insert (out_table, keyword); -- ... as plain text, to the output list
end
end
return out_table;
end
--[[--------------------------< K E Y W O R D S T A B L E >--------------------------------------------------
this is a list of keywords; each key in the list is associated with a table of synonymous keywords possibly from
different languages.
for i18n: add local-language keywords to value table; do not change the key. For example, adding the German keyword 'ja':
['affirmative'] = {'yes', 'true', 'y', 'ja'},
Because cs1|2 templates from en.wiki articles are often copied to other local wikis, it is recommended that the English
keywords remain in these tables.
]]
local keywords = {
['affirmative'] = {'yes', 'true', 'y'}, -- ignore-isbn-error, last-author-amp, no-tracking, nopp -- (Used by InternetArchiveBot)
['afterword'] = {'afterword'}, -- contribution
['bot: unknown'] = {'bot: unknown'}, -- url-status -- (Used by InternetArchiveBot)
['cs1'] = {'cs1'}, -- mode
['cs2'] = {'cs2'}, -- mode
['dead'] = {'dead'}, -- url-status -- (Used by InternetArchiveBot)
['dmy'] = {'dmy'}, -- df
['dmy-all'] = {'dmy-all'}, -- df
['foreword'] = {'foreword'}, -- contribution
['free'] = {'free'}, -- url-access -- (Used by InternetArchiveBot)
['introduction'] = {'introduction'}, -- contribution
['limited'] = {'limited'}, -- url-access -- (Used by InternetArchiveBot)
['live'] = {'live'}, -- url-status -- (Used by InternetArchiveBot)
['mdy'] = {'mdy'}, -- df
['mdy-all'] = {'mdy-all'}, -- df
['preface'] = {'preface'}, -- contribution
['registration'] = {'registration'}, -- url-access -- (Used by InternetArchiveBot)
['subscription'] = {'subscription'}, -- url-access -- (Used by InternetArchiveBot)
['unfit'] = {'unfit'}, -- url-status -- (Used by InternetArchiveBot)
['usurped'] = {'usurped'}, -- url-status -- (Used by InternetArchiveBot)
['vanc'] = {'vanc'}, -- name-list-format
['ymd'] = {'ymd'}, -- df
['ymd-all'] = {'ymd-all'}, -- df
-- ['yMd'] = {'yMd'}, -- df; not supported at en.wiki
-- ['yMd-all'] = {'yMd-all'}, -- df; not supported at en.wiki
}
--[[--------------------------< X L A T E _ K E Y W O R D S >--------------------------------------------------
this function builds a list, keywords_xlate{}, of the keywords found in keywords{} where the values from keywords{}
become the keys in keywords_xlate{} and the keys from keywords{} become the values in keywords_xlate{}:
['affirmative'] = {'yes', 'true', 'y'}, -- in keywords{}
becomes
['yes'] = 'affirmative', -- in keywords_xlate{}
['true'] = 'affirmative',
['y'] = 'affirmative',
the purpose of this function is to act as a translator between a non-English keyword and its English equivalent
that may be used in other modules of this suite
]]
local function xlate_keywords ()
local out_table = {}; -- output goes here
for k, keywords_t in pairs (keywords) do -- spin through the keywords table
for _, keyword in ipairs (keywords_t) do -- for each keyword
out_table[keyword] = k; -- create an entry in the output table where keyword is the key
end
end
return out_table;
end
local keywords_xlate = xlate_keywords (); -- the list of translated keywords
--[[--------------------------< K E Y W O R D S _ L I S T S >--------------------------------------------------
this is a list of lists of valid keywords for the various parameters in [key]. Generally the keys in this table
are the canonical en.wiki parameter names though some are contrived because of use in multiple differently named
parameters: ['yes_true_y'], ['id-access'].
The function make_keywords_list() extracts the individual keywords from the appropriate list in keywords{}.
The lists in this table are used to validate the keyword assignment for the parameters named in this table's keys.
]]
local keywords_lists = {
['yes_true_y'] = make_keywords_list ({keywords.affirmative}),
['contribution'] = make_keywords_list ({keywords.afterword, keywords.foreword, keywords.introduction, keywords.preface}),
['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all']}),
-- ['df'] = make_keywords_list ({keywords.dmy, keywords['dmy-all'], keywords.mdy, keywords['mdy-all'], keywords.ymd, keywords['ymd-all'], keywords.yMd, keywords['yMd-all']}), -- not supported at en.wiki
['mode'] = make_keywords_list ({keywords.cs1, keywords.cs2}),
['name-list-format'] = make_keywords_list ({keywords.vanc}),
['url-access'] = make_keywords_list ({keywords.subscription, keywords.limited, keywords.registration}),
['url-status'] = make_keywords_list ({keywords.dead, keywords.live, keywords.unfit, keywords.usurped, keywords['bot: unknown']}),
['id-access'] = make_keywords_list ({keywords.free}),
}
--[[--------------------------< S T R I P M A R K E R S >------------------------------------------------------
Common pattern definition location for stripmarkers so that we don't have to go hunting for them if (when)
MediaWiki changes their form.
]]
local stripmarkers = {
['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- capture returns name of stripmarker
['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- math stripmarkers used in coins_cleanup() and coins_replace_math_stripmarker()
}
--[[--------------------------< I N V I S I B L E _ C H A R A C T E R S >--------------------------------------
This table holds non-printing or invisible characters indexed either by name or by Unicode group. Values are decimal
representations of UTF-8 codes. The table is organized as a table of tables because the lua pairs keyword returns
table data in an arbitrary order. Here, we want to process the table from top to bottom because the entries at
the top of the table are also found in the ranges specified by the entries at the bottom of the table.
Also here is a pattern that recognizes stripmarkers that begin and end with the delete characters. The nowiki
stripmarker is not an error but some others are because the parameter values that include them become part of the
template's metadata before stripmarker replacement.
]]
local invisible_chars = {
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD
{'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B
{'hair space', '\226\128\138'}, -- U+200A, E2 80 8A
{'soft hyphen', '\194\173'}, -- U+00AD, C2 AD
{'horizontal tab', '\009'}, -- U+0009 (HT), 09
{'line feed', '\010'}, -- U+000A (LF), 0A
{'carriage return', '\013'}, -- U+000D (CR), 0D
{'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type
{'delete', '\127'}, -- U+007F (DEL), 7F; must be done after stripmarker test
{'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D))
{'C1 control', '[\194\128-\194\159]'}, -- U+0080–U+009F (XXX–APC), C2 80 – C2 9F
-- {'Specials', '[\239\191\185-\239\191\191]'}, -- U+FFF9-U+FFFF, EF BF B9 – EF BF BF
-- {'Private use area', '[\238\128\128-\239\163\191]'}, -- U+E000–U+F8FF, EE 80 80 – EF A3 BF
-- {'Supplementary Private Use Area-A', '[\243\176\128\128-\243\191\191\189]'}, -- U+F0000–U+FFFFD, F3 B0 80 80 – F3 BF BF BD
-- {'Supplementary Private Use Area-B', '[\244\128\128\128-\244\143\191\189]'}, -- U+100000–U+10FFFD, F4 80 80 80 – F4 8F BF BD
}
--[[
Indic script makes use of zero width joiner as a character modifier so zwj characters must be left in. This
pattern covers all of the unicode characters for these languages:
Devanagari 0900–097F – https://unicode.org/charts/PDF/U0900.pdf
Devanagari extended A8E0–A8FF – https://unicode.org/charts/PDF/UA8E0.pdf
Bengali 0980–09FF – https://unicode.org/charts/PDF/U0980.pdf
Gurmukhi 0A00–0A7F – https://unicode.org/charts/PDF/U0A00.pdf
Gujarati 0A80–0AFF – https://unicode.org/charts/PDF/U0A80.pdf
Oriya 0B00–0B7F – https://unicode.org/charts/PDF/U0B00.pdf
Tamil 0B80–0BFF – https://unicode.org/charts/PDF/U0B80.pdf
Telugu 0C00–0C7F – https://unicode.org/charts/PDF/U0C00.pdf
Kannada 0C80–0CFF – https://unicode.org/charts/PDF/U0C80.pdf
Malayalam 0D00–0D7F – https://unicode.org/charts/PDF/U0D00.pdf
plus the not-necessarily Indic scripts for Sinhala and Burmese:
Sinhala 0D80-0DFF - https://unicode.org/charts/PDF/U0D80.pdf
Myanmar 1000-109F - https://unicode.org/charts/PDF/U1000.pdf
Myanmar extended A AA60-AA7F - https://unicode.org/charts/PDF/UAA60.pdf
Myanmar extended B A9E0-A9FF - https://unicode.org/charts/PDF/UA9E0.pdf
the pattern is used by has_invisible_chars() and coins_cleanup()
TODO: find a better place for this?
]]
local indic_script = '[\224\164\128-\224\181\191\224\163\160-\224\183\191\225\128\128-\225\130\159\234\167\160-\234\167\191\234\169\160-\234\169\191]';
--[[--------------------------< L A N G U A G E S U P P O R T >----------------------------------------------
These tables and constants support various language-specific functionality.
]]
local this_wiki_code = mw.getContentLanguage():getCode() -- get this wiki's language code
local local_lang_cat_enable = false; -- set to true to categorize pages where |language=<local wiki's language>
--[[--------------------------< S C R I P T _ L A N G _ C O D E S >--------------------------------------------
This table is used to hold ISO 639-1 two-character language codes that apply only to |script-title= and |script-chapter=
]]
local script_lang_codes = {
'am', 'ar', 'be', 'bg', 'bn', 'bo', 'bs', 'dv', 'dz', 'el', 'fa', -- ISO 639-1 codes only for |script-title= and |script-chapter=
'gu', 'he', 'hi', 'hy', 'ja', 'ka', 'kk', 'km', 'kn', 'ko', 'ku',
'mk', 'ml', 'mn', 'mr', 'my', 'ne', 'ota', 'ps', 'ru', 'sd', 'si',
'sr', 'ta', 'tg', 'th', 'ug', 'uk', 'ur', 'uz', 'yi', 'zh'
};
--[[--------------------------< L A N G U A G E R E M A P P I N G >------------------------------------------
These tables hold language information that is different (correct) from MediaWiki's definitions
]]
local lang_code_remap = { -- used for |language= and |script-title= / |script-chapter=
['als'] = 'Tosk Albanian', -- MediaWiki returns Alemannisch
['bh'] = 'Bihari', -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri wWikipedia: bh.wikipedia.org
['bla'] = 'Blackfoot', -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name
['bn'] = 'Bengali', -- MediaWiki returns Bangla
['ca-valencia'] = 'Valencian', -- IETF variant of Catalan
['crh'] = 'Crimean Tatar', -- synonymous with Crimean Turkish (return value from {{#language:crh|en}})
['ilo'] = 'Ilocano', -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name
['ksh'] = 'Kölsch', -- MediaWiki: Colognian; use IANA/ISO 639 preferred name
['ksh-x-colog'] = 'Colognian', -- override MediaWiki ksh; no IANA/ISO 639 code for Colognian; IETF private code created at Module:Lang/data
['mis-x-ripuar'] = 'Ripuarian', -- override MediaWiki ksh; no IANA/ISO 639 code for Ripuarian; IETF private code created at Module:Lang/data
['nan-tw'] = 'Taiwanese Hokkien', -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese and support en.wiki preferred name
}
local lang_name_remap = { -- used for |language=
['alemannisch'] = {'Swiss German', 'gsw'}, -- not an ISO or IANA language name; MediaWiki uses 'als' as a subdomain name for Alemannic Wikipedia: als.wikipedia.org
['bangla'] = {'Bengali', 'bn'}, -- MediaWiki returns Bangla (the endonym) but we want Bengali (the exonym); here we remap
['bengali'] = {'Bengali', 'bn'}, -- MediaWiki doesn't use exonym so here we provide correct language name and 639-1 code
['bhojpuri'] = {'Bhojpuri', 'bho'}, -- MediaWiki uses 'bh' as a subdomain name for Bhojpuri Wikipedia: bh.wikipedia.org
['bihari'] = {'Bihari', 'bh'}, -- MediaWiki replaces 'Bihari' with 'Bhojpuri' so 'Bihari' cannot be found
['blackfoot'] = {'Blackfoot', 'bla'}, -- MediaWiki/IANA/ISO 639: Siksika; use en.wiki preferred name
['colognian'] = {'Colognian', 'ksh-x-colog'}, -- MediaWiki preferred name for ksh
['crimean tatar'] = {'Crimean Tatar', 'crh'}, -- MediaWiki uses 'crh' as a subdomain name for Crimean Tatar Wikipedia: crh.wikipedia.org
['ilocano'] = {'Ilocano', 'ilo'}, -- MediaWiki/IANA/ISO 639: Iloko; use en.wiki preferred name
['kolsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name (use o instead of ö)
['kölsch'] = {'Kölsch', 'ksh'}, -- use IANA/ISO 639 preferred name
['ripuarian'] = {'Ripuarian', 'mis-x-ripuar'}, -- group of dialects; no code in MediaWiki or in IANA/ISO 639
-- ['siksika'] = {'Siksika', 'bla'}, -- MediaWiki/IANA/ISO 639 preferred name: Siksika
['taiwanese hokkien'] = {'Taiwanese Hokkien', 'nan-TW'}, -- make room for MediaWiki/IANA/ISO 639 nan: Min Nan Chinese
['tosk albanian'] = {'Tosk Albanian', 'als'}, -- MediaWiki replaces 'Tosk Albanian' with 'Alemannisch' so 'Tosk Albanian' cannot be found
['valencian'] = {'Valencian', 'ca'}, -- variant of Catalan; categorizes as Catalan
}
--[[--------------------------< M A I N T E N A N C E _ C A T E G O R I E S >----------------------------------
Here we name maintenance categories to be used in maintenance messages.
]]
local maint_cats = {
['ASIN'] = 'CS1 maint: ASIN uses ISBN',
['archived_copy'] = 'CS1 maint: archived copy as title',
['authors'] = 'CS1 maint: uses authors parameter',
['bot:_unknown'] = 'CS1 maint: BOT: original-url status unknown',
['date_format'] = 'CS1 maint: date format',
['date_year'] = 'CS1 maint: date and year',
['disp_name'] = 'CS1 maint: display-$1', -- $1 is authors, contributors, editors, interviewers, translators; gets value from special_case_translation table
['editors'] = 'CS1 maint: uses editors parameter',
['embargo'] = 'CS1 maint: PMC embargo expired',
['extra_punct'] = 'CS1 maint: extra punctuation',
['extra_text'] = 'CS1 maint: extra text',
['extra_text_names'] = 'CS1 maint: extra text: $1', -- $1 is <name>s list; gets value from special_case_translation table
['ignore_isbn_err'] = 'CS1 maint: ignored ISBN errors',
['location'] = 'CS1 maint: location',
['mult_names'] = 'CS1 maint: multiple names: $1', -- $1 is <name>s list; gets value from special_case_translation table
['others'] = 'CS1 maint: others',
['pmc_format'] = 'CS1 maint: PMC format',
['unfit'] = 'CS1 maint: unfit url',
['unknown_lang'] = 'CS1 maint: unrecognized language',
['untitled'] = 'CS1 maint: untitled periodical',
['zbl'] = 'CS1 maint: ZBL',
}
--[[--------------------------< P R O P E R T I E S _ C A T E G O R I E S >------------------------------------
Here we name properties categories
]]
local prop_cats = {
['foreign_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is foreign-language name, $2 is ISO639-1 code
['foreign_lang_source_2'] = 'CS1 foreign language sources (ISO 639-2)|$1', -- |language= category; a cat for ISO639-2 languages; $1 is the ISO 639-2 code used as a sort key
['local_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is local-language name, $2 is ISO639-1 code; not emitted when local_lang_cat_enable is false
['location test'] = 'CS1 location test',
['script'] = 'CS1 uses foreign language script', -- when language specified by |script-title=xx: doesn't have its own category
['script_with_name'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code
['jul_greg_uncertainty'] = 'CS1: Julian–Gregorian uncertainty', -- probably temporary cat to identify scope of template with dates 1 October 1582 – 1 January 1926
['long_vol'] = 'CS1: long volume value', -- probably temporary cat to identify scope of |volume= values longer than 4 charachters
}
--[[--------------------------< T I T L E _ T Y P E S >--------------------------------------------------------
Here we map a template's CitationClass to TitleType (default values for |type= parameter)
]]
local title_types = {
['AV-media-notes'] = 'Media notes',
['interview'] = 'Interview',
['mailinglist'] = 'Mailing list',
['map'] = 'Map',
['podcast'] = 'Podcast',
['pressrelease'] = 'Press release',
['report'] = 'Report',
['techreport'] = 'Technical report',
['thesis'] = 'Thesis',
}
--[[--------------------------< E R R O R _ C O N D I T I O N S >----------------------------------------------
Error condition table
The following contains a list of IDs for various error conditions defined in the code. For each ID, we specify a
text message to display, an error category to include, and whether the error message should be wrapped as a hidden comment.
Anchor changes require identical changes to matching anchor in Help:CS1 errors
]]
local error_conditions = {
accessdate_missing_url = {
message = '<code class="cs1-code">|access-date=</code> requires <code class="cs1-code">|url=</code>',
anchor = 'accessdate_missing_url',
category = 'Pages using citations with accessdate and no URL',
hidden = false
},
apostrophe_markup = {
message = 'Italic or bold markup not allowed in: <code class="cs1-code">|$1=</code>',
anchor = 'apostrophe_markup',
category = 'CS1 errors: markup',
hidden = false
},
archive_missing_date = {
message = '<code class="cs1-code">|archive-url=</code> requires <code class="cs1-code">|archive-date=</code>',
anchor = 'archive_missing_date',
category = 'Pages with archiveurl citation errors',
hidden = false
},
archive_missing_url = {
message = '<code class="cs1-code">|archive-url=</code> requires <code class="cs1-code">|url=</code>',
anchor = 'archive_missing_url',
category = 'Pages with archiveurl citation errors',
hidden = false
},
archive_url = {
message = '<code class="cs1-code">|archive-url=</code> is malformed: $1',
anchor = 'archive_url',
category = 'Pages with archiveurl citation errors',
hidden = false
},
arxiv_missing = {
message = '<code class="cs1-code">|arxiv=</code> required',
anchor = 'arxiv_missing',
category = 'CS1 errors: arXiv', -- same as bad arxiv
hidden = false
},
arxiv_params_not_supported = {
message = 'Unsupported parameter(s) in cite arXiv',
anchor = 'arxiv_params_not_supported',
category = 'CS1 errors: arXiv', -- same as bad arxiv
hidden = false
},
bad_arxiv = {
message = 'Check <code class="cs1-code">|arxiv=</code> value',
anchor = 'bad_arxiv',
category = 'CS1 errors: arXiv',
hidden = false
},
bad_asin = {
message = 'Check <code class="cs1-code">|asin=</code> value',
anchor = 'bad_asin',
category ='CS1 errors: ASIN',
hidden = false
},
bad_bibcode = {
message = 'Check <code class="cs1-code">|bibcode=</code> $1',
anchor = 'bad_bibcode',
category = 'CS1 errors: bibcode',
hidden = false
},
bad_biorxiv = {
message = 'Check <code class="cs1-code">|biorxiv=</code> value',
anchor = 'bad_biorxiv',
category = 'CS1 errors: bioRxiv',
hidden = false
},
bad_citeseerx = {
message = 'Check <code class="cs1-code">|citeseerx=</code> value',
anchor = 'bad_citeseerx',
category = 'CS1 errors: citeseerx',
hidden = false
},
bad_date = {
message = 'Check date values in: <code class="cs1-code">$1</code>',
anchor = 'bad_date',
category = 'CS1 errors: dates',
hidden = false
},
bad_doi = {
message = 'Check <code class="cs1-code">|doi=</code> value',
anchor = 'bad_doi',
category = 'CS1 errors: DOI',
hidden = false
},
bad_hdl = {
message = 'Check <code class="cs1-code">|hdl=</code> value',
anchor = 'bad_hdl',
category = 'CS1 errors: HDL',
hidden = false
},
bad_isbn = {
message = 'Check <code class="cs1-code">|isbn=</code> value: $1',
anchor = 'bad_isbn',
category = 'CS1 errors: ISBN',
hidden = false
},
bad_ismn = {
message = 'Check <code class="cs1-code">|ismn=</code> value',
anchor = 'bad_ismn',
category = 'CS1 errors: ISMN',
hidden = false
},
bad_issn = {
message = 'Check <code class="cs1-code">|$1issn=</code> value',
anchor = 'bad_issn',
category = 'CS1 errors: ISSN',
hidden = false
},
bad_jfm = {
message = 'Check <code class="cs1-code">|jfm=</code> value',
anchor = 'bad_jfm',
category = 'CS1 errors: JFM',
hidden = false
},
bad_lccn = {
message = 'Check <code class="cs1-code">|lccn=</code> value',
anchor = 'bad_lccn',
category = 'CS1 errors: LCCN',
hidden = false
},
bad_usenet_id = {
message = 'Check <code class="cs1-code">|message-id=</code> value',
anchor = 'bad_message_id',
category = 'CS1 errors: message-id',
hidden = false
},
bad_mr = {
message = 'Check <code class="cs1-code">|mr=</code> value',
anchor = 'bad_mr',
category = 'CS1 errors: MR',
hidden = false
},
bad_ol = {
message = 'Check <code class="cs1-code">|ol=</code> value',
anchor = 'bad_ol',
category = 'CS1 errors: OL',
hidden = false
},
bad_paramlink = { -- for |title-link=, |author/editor/translator-link=, |series-link=, |episode-link=
message = 'Check <code class="cs1-code">|$1=</code> value',
anchor = 'bad_paramlink',
category = 'CS1 errors: parameter link',
hidden = false
},
bad_pmc = {
message = 'Check <code class="cs1-code">|pmc=</code> value',
anchor = 'bad_pmc',
category = 'CS1 errors: PMC',
hidden = false
},
bad_pmid = {
message = 'Check <code class="cs1-code">|pmid=</code> value',
anchor = 'bad_pmid',
category = 'CS1 errors: PMID',
hidden = false
},
bad_oclc = {
message = 'Check <code class="cs1-code">|oclc=</code> value',
anchor = 'bad_oclc',
category = 'CS1 errors: OCLC',
hidden = false
},
bad_ssrn = {
message = 'Check <code class="cs1-code">|ssrn=</code> value',
anchor = 'bad_ssrn',
category = 'CS1 errors: SSRN',
hidden = false
},
bad_url = {
message = 'Check $1 value',
anchor = 'bad_url',
category = 'Pages with URL errors',
hidden = false
},
bad_zbl = {
message = 'Check <code class="cs1-code">|zbl=</code> value',
anchor = 'bad_zbl',
category = 'CS1 errors: ZBL',
hidden = false
},
bare_url_missing_title = {
message = '$1 missing title',
anchor = 'bare_url_missing_title',
category = 'Pages with citations having bare URLs',
hidden = false
},
biorxiv_missing = {
message = '<code class="cs1-code">|biorxiv=</code> required',
anchor = 'biorxiv_missing',
category = 'CS1 errors: bioRxiv', -- same as bad bioRxiv
hidden = false
},
chapter_ignored = {
message = '<code class="cs1-code">|$1=</code> ignored',
anchor = 'chapter_ignored',
category = 'CS1 errors: chapter ignored',
hidden = false
},
citation_missing_title = {
message = 'Missing or empty <code class="cs1-code">|$1=</code>',
anchor = 'citation_missing_title',
category = 'Pages with citations lacking titles',
hidden = false
},
citeseerx_missing = {
message = '<code class="cs1-code">|citeseerx=</code> required',
anchor = 'citeseerx_missing',
category = 'CS1 errors: citeseerx', -- same as bad citeseerx
hidden = false
},
cite_web_url = { -- this error applies to cite web and to cite podcast
message = 'Missing or empty <code class="cs1-code">|url=</code>',
anchor = 'cite_web_url',
category = 'Pages using web citations with no URL',
hidden = false
},
class_ignored = {
message = '<code class="cs1-code">|class=</code> ignored',
anchor = 'class_ignored',
category = 'CS1 errors: class',
hidden = false
},
contributor_ignored = {
message = '<code class="cs1-code">|contributor=</code> ignored',
anchor = 'contributor_ignored',
category = 'CS1 errors: contributor',
hidden = false
},
contributor_missing_required_param = {
message = '<code class="cs1-code">|contributor=</code> requires <code class="cs1-code">|$1=</code>',
anchor = 'contributor_missing_required_param',
category = 'CS1 errors: contributor',
hidden = false
},
deprecated_params = {
message = 'Cite uses deprecated parameter <code class="cs1-code">|$1=</code>',
anchor = 'deprecated_params',
category = 'CS1 errors: deprecated parameters',
hidden = false
},
doibroken_missing_doi = {
message = '<code class="cs1-code">|$1=</code> requires <code class="cs1-code">|doi=</code>',
anchor = 'doibroken_missing_doi',
category = 'CS1 errors: DOI',
hidden = false
},
empty_citation = {
message = 'Empty citation',
anchor = 'empty_citation',
category = 'Pages with empty citations',
hidden = false
},
etal = {
message = 'Explicit use of et al. in: <code class="cs1-code">|$1=</code>',
anchor = 'explicit_et_al',
category = 'CS1 errors: explicit use of et al.',
hidden = false
},
first_missing_last = {
message = '<code class="cs1-code">|$1=</code> missing <code class="cs1-code">|$2=</code>', -- $1 is first alias, $2 is matching last alias
anchor = 'first_missing_last',
category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator
hidden = false
},
format_missing_url = {
message = '<code class="cs1-code">|$1=</code> requires <code class="cs1-code">|$2=</code>',
anchor = 'format_missing_url',
category = 'Pages using citations with format and no URL',
hidden = false
},
invalid_param_val = {
message = 'Invalid <code class="cs1-code">|$1=$2</code>',
anchor = 'invalid_param_val',
category = 'CS1 errors: invalid parameter value',
hidden = false
},
invisible_char = {
message = '$1 in $2 at position $3',
anchor = 'invisible_char',
category = 'CS1 errors: invisible characters',
hidden = false
},
missing_name = {
message = 'Missing <code class="cs1-code">|$1$2=</code>', -- $1 is modified NameList; $2 is enumerator
anchor = 'missing_name',
category = 'CS1 errors: missing name', -- author, contributor, editor, interviewer, translator
hidden = false
},
missing_periodical = {
message = 'Cite $1 requires <code class="cs1-code">|$2=</code>', -- $1 is cs1 template name; $2 is canonical periodical parameter name for cite $1
anchor = 'missing_periodical',
category = 'CS1 errors: missing periodical',
hidden = true
},
missing_pipe = {
message = 'Missing pipe in: <code class="cs1-code">|$1=</code>',
anchor = 'missing_pipe',
category = 'CS1 errors: missing pipe',
hidden = false
},
param_access_requires_param = {
message = '<code class="cs1-code">|$1-access=</code> requires <code class="cs1-code">|$1=</code>',
anchor = 'param_access_requires_param',
category = 'CS1 errors: param-access',
hidden = false
},
param_has_ext_link = {
message = 'External link in <code class="cs1-code">$1</code>',
anchor = 'param_has_ext_link',
category = 'CS1 errors: external links',
hidden = false
},
parameter_ignored = {
message = 'Unknown parameter <code class="cs1-code">|$1=</code> ignored',
anchor = 'parameter_ignored',
category = 'Pages with citations using unsupported parameters',
hidden = false
},
parameter_ignored_suggest = {
message = 'Unknown parameter <code class="cs1-code">|$1=</code> ignored (<code class="cs1-code">|$2=</code> suggested)',
anchor = 'parameter_ignored_suggest',
category = 'Pages with citations using unsupported parameters',
hidden = false
},
redundant_parameters = {
message = 'More than one of $1 specified',
anchor = 'redundant_parameters',
category = 'Pages with citations having redundant parameters',
hidden = false
},
script_parameter = {
message = 'Invalid <code class="cs1-code">|$1=</code>: $2',
anchor = 'script_parameter',
category = 'CS1 errors: script parameters',
hidden = false
},
ssrn_missing = {
message = '<code class="cs1-code">|ssrn=</code> required',
anchor = 'ssrn_missing',
category = 'CS1 errors: ssrn', -- same as bad arxiv
hidden = false
},
text_ignored = {
message = 'Text "$1" ignored',
anchor = 'text_ignored',
category = 'Pages with citations using unnamed parameters',
hidden = false
},
trans_missing_title = {
message = '<code class="cs1-code">|trans-$1=</code> requires <code class="cs1-code">|$1=</code>',
anchor = 'trans_missing_title',
category = 'CS1 errors: translated title',
hidden = false
},
vancouver = {
message = 'Vancouver style error: $1',
anchor = 'vancouver',
category = 'CS1 errors: Vancouver style',
hidden = false
},
wikilink_in_url = {
message = 'URL–wikilink conflict', -- uses ndash
anchor = 'wikilink_in_url',
category = 'CS1 errors: URL–wikilink conflict', -- uses ndash
hidden = false
},
}
--[[--------------------------< I D _ H A N D L E R S >--------------------------------------------------------
The following contains a list of values for various defined identifiers. For each identifier we specify a
variety of information necessary to properly render the identifier in the citation.
parameters: a list of parameter aliases for this identifier
link: Wikipedia article name
q: wikidata q number for the identifier
label: the alternate name to apply to link
mode: 'manual' when there is a specific function in the code to handle the identifier;
'external' for identifiers that link outside of Wikipedia;
prefix: the first part of a url that will be concatenated with a second part which usually contains the identifier
encode: true if uri should be percent encoded; otherwise false
COinS: identifier link or keyword for use in COinS:
for identifiers registered at info-uri.info use: info:....
for identifiers that have COinS keywords, use the keyword: rft.isbn, rft.issn, rft.eissn
for others make a url using the value in prefix, use the keyword: pre (not checked; any text other than 'info' or 'rft' works here)
set to nil to leave the identifier out of the COinS
separator: character or text between label and the identifier in the rendered citation
access: use this parameter to set the access level for all instances of this identifier.
the value must be a valid access level for an identifier (see ['id-access'] in this file).
custom_access: to enable custom access level for an identifier, set this parameter
to the parameter that should control it (normally 'id-access')
]]
local id_handlers = {
['ARXIV'] = {
parameters = {'arxiv', 'eprint'},
link = 'arXiv',
q = 'Q118398',
label = 'arXiv',
mode = 'manual',
prefix = '//arxiv.org/abs/', -- protocol relative tested 2013-09-04
encode = false,
COinS = 'info:arxiv',
separator = ':',
access = 'free', -- free to read
},
['ASIN'] = {
parameters = { 'asin', 'ASIN' },
link = 'Amazon Standard Identification Number',
q = 'Q1753278',
label = 'ASIN',
mode = 'manual',
prefix = '//www.amazon.',
COinS = nil, -- no COinS for this id (needs thinking on implementation because |asin-tld=)
separator = ' ',
encode = false;
},
['BIBCODE'] = {
parameters = {'bibcode'},
link = 'Bibcode',
q = 'Q25754',
label = 'Bibcode',
mode = 'manual',
prefix = 'https://ui.adsabs.harvard.edu/abs/',
encode = false,
COinS = 'info:bibcode',
separator = ':',
custom_access = 'bibcode-access',
},
['BIORXIV'] = {
parameters = {'biorxiv'},
link = 'bioRxiv',
q = 'Q19835482',
label = 'bioRxiv',
mode = 'manual',
prefix = '//doi.org/10.1101/',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = ' ',
},
['CITESEERX'] = {
parameters = {'citeseerx'},
link = 'CiteSeerX',
q = 'Q2715061',
label = 'CiteSeerX',
mode = 'manual', -- manual for custom validation of the "doi"
prefix = '//citeseerx.ist.psu.edu/viewdoc/summary?doi=',
COinS = 'pre', -- use prefix value
access = 'free', -- free to read
encode = true,
separator = ' ',
},
['DOI'] = { -- (Used by InternetArchiveBot)
parameters = { 'doi', 'DOI' },
link = 'Digital object identifier',
q = 'Q25670',
label = 'doi',
mode = 'manual',
prefix = '//doi.org/',
COinS = 'info:doi',
separator = ':',
encode = true,
custom_access = 'doi-access',
},
['EISSN'] = {
parameters = {'eissn', 'EISSN'},
link = 'International_Standard_Serial_Number#Electronic_ISSN',
q = 'Q46339674',
label = 'eISSN',
mode = 'manual',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.eissn',
encode = false,
separator = ' ',
},
['HDL'] = {
parameters = { 'hdl', 'HDL' },
link = 'Handle System',
q = 'Q3126718',
label = 'hdl',
mode = 'manual',
prefix = '//hdl.handle.net/',
COinS = 'info:hdl',
separator = ':',
encode = true,
custom_access = 'hdl-access',
},
['ISBN'] = { -- (Used by InternetArchiveBot)
parameters = {'isbn', 'ISBN', 'isbn13', 'ISBN13'},
link = 'International Standard Book Number',
q = 'Q33057',
label = 'ISBN',
mode = 'manual',
prefix = 'Special:BookSources/',
COinS = 'rft.isbn',
separator = ' ',
},
['ISMN'] = {
parameters = {'ismn', 'ISMN'},
link = 'International Standard Music Number',
q = 'Q1666938',
label = 'ISMN',
mode = 'manual',
prefix = '', -- not currently used;
COinS = 'nil', -- nil because we can't use pre or rft or info:
separator = ' ',
},
['ISSN'] = {
parameters = {'issn', 'ISSN'},
link = 'International Standard Serial Number',
q = 'Q131276',
label = 'ISSN',
mode = 'manual',
prefix = '//www.worldcat.org/issn/',
COinS = 'rft.issn',
encode = false,
separator = ' ',
},
['JFM'] = {
parameters = {'jfm', 'JFM'},
link = 'Jahrbuch über die Fortschritte der Mathematik',
q = '',
label = 'JFM',
mode = 'manual',
prefix = '//zbmath.org/?format=complete&q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
['JSTOR'] = {
parameters = {'jstor', 'JSTOR'},
link = 'JSTOR',
q = 'Q1420342',
label = 'JSTOR',
mode = 'external',
prefix = '//www.jstor.org/stable/', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
custom_access = 'jstor-access',
},
['LCCN'] = {
parameters = {'LCCN', 'lccn'},
link = 'Library of Congress Control Number',
q = 'Q620946',
label = 'LCCN',
mode = 'manual',
prefix = '//lccn.loc.gov/', -- protocol relative tested 2015-12-28
COinS = 'info:lccn', -- use prefix value
encode = false,
separator = ' ',
},
['MR'] = {
parameters = {'MR', 'mr'},
link = 'Mathematical Reviews',
q = 'Q211172',
label = 'MR',
mode = 'manual',
prefix = '//www.ams.org/mathscinet-getitem?mr=', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
['OCLC'] = {
parameters = {'OCLC', 'oclc'},
link = 'OCLC',
q = 'Q190593',
label = 'OCLC',
mode = 'manual',
prefix = '//www.worldcat.org/oclc/',
COinS = 'info:oclcnum',
encode = true,
separator = ' ',
},
['OL'] = {
parameters = { 'ol', 'OL' },
link = 'Open Library',
q = 'Q1201876',
label = 'OL',
mode = 'manual',
prefix = '//openlibrary.org/',
COinS = nil, -- no COinS for this id (needs thinking on implementation because /authors/books/works/OL)
separator = ' ',
encode = true,
custom_access = 'ol-access',
},
['OSTI'] = {
parameters = {'OSTI', 'osti'},
link = 'Office of Scientific and Technical Information',
q = 'Q2015776',
label = 'OSTI',
mode = 'external',
prefix = '//www.osti.gov/biblio/', -- protocol relative tested 2018-09-12
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
custom_access = 'osti-access',
},
['PMC'] = {
parameters = {'PMC', 'pmc'},
link = 'PubMed Central',
q = 'Q229883',
label = 'PMC',
mode = 'manual',
prefix = '//www.ncbi.nlm.nih.gov/pmc/articles/PMC',
suffix = " ",
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
access = 'free', -- free to read
},
['PMID'] = {
parameters = {'PMID', 'pmid'},
link = 'PubMed Identifier',
q = '',
label = 'PMID',
mode = 'manual',
-- prefix = '//www.ncbi.nlm.nih.gov/pubmed/',
prefix = '//pubmed.ncbi.nlm.nih.gov/', -- new for 2020
COinS = 'info:pmid',
encode = false,
separator = ' ',
},
['RFC'] = {
parameters = {'RFC', 'rfc'},
link = 'Request for Comments',
q = 'Q212971',
label = 'RFC',
mode = 'external',
prefix = '//tools.ietf.org/html/rfc',
COinS = 'pre', -- use prefix value
encode = false,
separator = ' ',
access = 'free', -- free to read
},
['SSRN'] = {
parameters = {'SSRN', 'ssrn'},
link = 'Social Science Research Network',
q = 'Q7550801',
label = 'SSRN',
mode = 'manual',
prefix = '//ssrn.com/abstract=', -- protocol relative tested 2013-09-04
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
access = 'free', -- always free to read
},
['USENETID'] = {
parameters = {'message-id'},
link = 'Usenet',
q = 'Q193162',
label = 'Usenet:',
mode = 'manual',
prefix = 'news:',
encode = false,
COinS = 'pre', -- use prefix value
separator = ' ',
},
['ZBL'] = {
parameters = {'ZBL', 'zbl'},
link = 'Zentralblatt MATH',
q = 'Q190269',
label = 'Zbl',
mode = 'manual',
prefix = '//zbmath.org/?format=complete&q=an:',
COinS = 'pre', -- use prefix value
encode = true,
separator = ' ',
},
}
--[[--------------------------< E X P O R T E D T A B L E S >------------------------------------------------
]]
return {
aliases = aliases,
special_case_translation = special_case_translation,
defaults = defaults,
date_names = date_names,
error_conditions = error_conditions,
editor_markup_patterns = editor_markup_patterns,
et_al_patterns = et_al_patterns,
global_df = global_df,
id_handlers = id_handlers,
keywords_lists = keywords_lists,
keywords_xlate = keywords_xlate,
stripmarkers=stripmarkers,
invisible_chars = invisible_chars,
indic_script = indic_script,
local_lang_cat_enable = local_lang_cat_enable,
maint_cats = maint_cats,
messages = messages,
presentation = presentation,
prop_cats = prop_cats,
punct_skip = punct_skip,
script_lang_codes = script_lang_codes,
lang_code_remap = lang_code_remap,
lang_name_remap = lang_name_remap,
this_wiki_code = this_wiki_code,
title_types = title_types,
uncategorized_namespaces = uncategorized_namespaces,
uncategorized_subpages = uncategorized_subpages,
templates_using_volume = templates_using_volume,
templates_using_issue = templates_using_issue,
templates_not_using_page = templates_not_using_page,
}
86f2dabcd7593bf2a9d534b2492e0045b8c0802a
Модуль:Citation/CS1/Whitelist
828
11
14
2022-07-19T12:24:00Z
CyberTailor
2
импорт модуля
Scribunto
text/plain
--[[--------------------------< P A R A M E T E R S N O T S U P P O R T E D >------------------------------
This is a list of parameters that once were but now are no longer supported:
['albumlink'] = nil, -- unique alias of titlelink used by old cite AV media notes
['albumtype'] = nil, -- controled inappropriate functionality in the old cite AV media notes
['artist'] = nil, -- unique alias of others used by old cite AV media notes
['ARXIV'] = nil, -- not an initialization
['Author'] = nil, -- non-standard capitalization
['authorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['author-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['author-name-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['author-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['began'] = nil, -- module handles date ranges; cite episode and cite series
['BIBCODE'] = nil, -- not an initialization
['callsign'] = nil, -- cite interview removed
['call-sign'] = nil, -- cite interview removed
['chapterlink'] = nil, -- if ever necessary to link to a chapter article, |chapter= can be wikilinked
['chapter-link'] = nil, --
['city'] = nil, -- cite interview removed
['coauthor'] = nil, -- redundant to |authorn=; not made part of metadata
['coauthors'] = nil, -- redundant to |authorn=; not made part of metadata
['cointerviewers'] = nil, -- unique alias of others used by old cite interview
['day'] = nil, -- deprecated in {{citation/core}} and somehow undeprecated in Module:Citation/CS1 and now finally removed
['director'] = nil, -- unique alias of author used by old cite DVD-notes
['doi_brokendate'] = nil, -- alias of doi-broken-date
['doi_inactivedate'] = nil, -- alias of doi-inactive-date
['DoiBroken'] = nil, -- not used, non-standard captialization
['Editor'] = nil, -- non-standard capitalization
['editorformat'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['EditorSurname'] = nil, -- non-standard capitalization
['editor-format'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['EditorGiven'] = nil, -- non-standard capitalization
['editor-name-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['editor-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['Embargo'] = nil, -- not used, non-standard capitalization
['ended'] = nil, -- module handles date ranges; cite episode and cite series
['in'] = nil, -- ambiguous between use for language, appearance of a lesser work in an edited work
['month'] = nil, -- functionality supported by |date=
['name-separator'] = nil, -- primarily used to support Vancouver format which functionality now part of name-list-format
['notestitle'] = nil, -- unique alias of chapter used by old cite AV media notes
['PPrefix'] = nil, -- non-standard capitalization
['PPPrefix'] = nil, -- not used, non-standard capitalization
['pp-prefix'] = nil, -- not used, not documented
['p-prefix'] = nil, -- not used, not documented
['program'] = nil, -- cite interview removed
['publisherid'] = nil, -- unique alias of id used by old cite AV media notes and old cite DVD-notes
['Ref'] = nil, -- non-standard capitalization
['separator'] = nil, -- this functionality now provided by |mode=
['template doc demo'] = nil, -- alias of template doc demo
['titleyear'] = nil, -- unique alias of origyear used by old cite DVD-notes
['trans_chapter'] = nil, -- alias of trans-chapter
['trans_title'] = nil, -- alias of trans-title
['Author#'] = nil, -- non-standard capitalization
['authors#'] = nil, -- no need for multiple lists of author names
['Editor#'] = nil, -- non-standard capitalization
['editors#'] = nil, -- no need for multiple lists of editor names
['EditorGiven#'] = nil, -- non-standard capitalization
['EditorSurname#'] = nil, -- non-standard capitalization
]]
--[[--------------------------< S U P P O R T E D P A R A M E T E R S >--------------------------------------
Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values:
true - these parameters are valid and supported parameters
false - these parameters are deprecated but still supported
nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter)
]]
local whitelist = {}
local basic_arguments = {
['accessdate'] = true,
['access-date'] = true,
['agency'] = true,
['airdate'] = true,
['air-date'] = true,
['archivedate'] = true,
['archive-date'] = true,
['archive-format'] = true,
['archiveurl'] = true,
['archive-url'] = true,
['article'] = true,
['article-format'] = true,
['article-url'] = true,
['article-url-access'] = true,
['arxiv'] = true,
['asin'] = true,
['ASIN'] = true,
['asin-tld'] = true,
['ASIN-TLD'] = false, -- not an identifier but an identifier-modifier
['at'] = true,
['author'] = true,
['author-first'] = true,
['author-last'] = true,
['authorlink'] = true,
['author-link'] = true,
['authormask'] = true,
['author-mask'] = true,
['authors'] = true,
['bibcode'] = true,
['bibcode-access'] = true,
['biorxiv'] = true,
['booktitle'] = true,
['book-title'] = true,
['cartography'] = true,
['chapter'] = true,
['chapter-format'] = true,
['chapterurl'] = true,
['chapter-url'] = true,
['chapter-url-access'] = true,
['citeseerx'] = true,
['class'] = false, -- cite arxiv only; general use deprecated
['coauthor'] = false, -- для рувики (а вообще депрекированный)
['coauthors'] = false, -- для рувики (а вообще депрекированный)
['collaboration'] = true,
['conference'] = true,
['conference-format'] = true,
['conferenceurl'] = true,
['conference-url'] = true,
['contribution'] = true,
['contribution-format'] = true,
['contributionurl'] = true,
['contribution-url'] = true,
['contributor'] = true,
['contributor-first'] = true,
['contributor-last'] = true,
['contributor-given'] = true,
['contributor-surname'] = true,
['contributor-link'] = true,
['contributor-mask'] = true,
['credits'] = true, -- cite episode, cite serial
['date'] = true,
['deadlink'] = false, -- для рувики (а вообще депрекированный)
['deadurl'] = true,
['dead-url'] = true,
['degree'] = true,
['department'] = true,
['df'] = true,
['dictionary'] = true,
['displayauthors'] = true,
['display-authors'] = true,
['displayeditors'] = true,
['display-editors'] = true,
['docket'] = true,
['doi'] = true,
['DOI'] = true,
['doi-access'] = true,
['doi-broken'] = true,
['doi-broken-date'] = true,
['doi-inactive-date'] = true,
['edition'] = true,
['editor'] = true,
['editor-first'] = true,
['editor-given'] = true,
['editor-last'] = true,
['editorlink'] = true,
['editor-link'] = true,
['editormask'] = true,
['editor-mask'] = true,
['editors'] = true,
['editor-surname'] = true,
['eissn'] = true,
['EISSN'] = true,
['embargo'] = true,
['encyclopaedia'] = true,
['encyclopedia'] = true,
['entry'] = true,
['entry-format'] = true,
['entry-url'] = true,
['entry-url-access'] = true,
['episode'] = true, -- cite serial only TODO: make available to cite episode?
['episodelink'] = true, -- cite episode and cite serial
['episode-link'] = true, -- cite episode and cite serial
['eprint'] = true, -- cite arxiv and arxiv identifiers
['event'] = true,
['event-format'] = true,
['eventurl'] = true,
['event-url'] = true,
['first'] = true,
['format'] = true,
['given'] = true,
['hdl'] = true,
['HDL'] = true,
['hdl-access'] = true,
['host'] = true,
['id'] = true,
['ID'] = true,
['ignoreisbnerror'] = true,
['ignore-isbn-error'] = true,
['inset'] = true,
['institution'] = true,
['interviewer'] = true,
['interviewer-first'] = true,
['interviewer-last'] = true,
['interviewerlink'] = true,
['interviewer-link'] = true,
['interviewermask'] = true,
['interviewer-mask'] = true,
['interviewers'] = true,
['isbn'] = true,
['ISBN'] = true,
['isbn13'] = true,
['ISBN13'] = true,
['ismn'] = true,
['ISMN'] = true,
['issn'] = true,
['ISSN'] = true,
['issue'] = true,
['jfm'] = true,
['JFM'] = true,
['journal'] = true,
['jstor'] = true,
['JSTOR'] = true,
['jstor-access'] = true,
['lang'] = true,
['language'] = true,
['last'] = true,
['lastauthoramp'] = true,
['last-author-amp'] = true,
['laydate'] = true,
['lay-date'] = true,
['laysource'] = true,
['lay-source'] = true,
['laysummary'] = true,
['lay-summary'] = true,
['lay-format'] = true,
['layurl'] = true,
['lay-url'] = true,
['lccn'] = true,
['LCCN'] = true,
['location'] = true,
['magazine'] = true,
['mailinglist'] = true, -- cite mailing list only
['mailing-list'] = true, -- cite mailing list only
['map'] = true, -- cite map only
['map-format'] = true, -- cite map only
['mapurl'] = true, -- cite map only
['map-url'] = true, -- cite map only
['medium'] = true,
['message-id'] = true, -- cite newsgroup
['minutes'] = true,
['mode'] = true,
['month'] = false, -- для рувики (а вообще депрекированный)
['mr'] = true,
['MR'] = true,
['name-list-format'] = true,
['network'] = true,
['newsgroup'] = true,
['newspaper'] = true,
['nocat'] = true,
['no-cat'] = true,
['nopp'] = true,
['no-pp'] = true,
['notracking'] = true,
['no-tracking'] = true,
['number'] = true,
['oclc'] = true,
['OCLC'] = true,
['ol'] = true,
['OL'] = true,
['ol-access'] = true,
['origyear'] = true,
['orig-year'] = true,
['osti'] = true,
['OSTI'] = true,
['osti-access'] = true,
['others'] = true,
['p'] = true,
['page'] = true,
['pages'] = true,
['people'] = true,
['periodical'] = true,
['place'] = true,
['pmc'] = true,
['PMC'] = true,
['pmid'] = true,
['PMID'] = true,
['postscript'] = true,
['pp'] = true,
['publicationdate'] = true,
['publication-date'] = true,
['publicationplace'] = true,
['publication-place'] = true,
['publisher'] = true,
['quotation'] = true,
['quote'] = true,
['ref'] = true,
['registration'] = true,
['rfc'] = true,
['RFC'] = true,
['s2cid'] = true,
['S2CID'] = true,
['s2cid-access'] = true,
['scale'] = true,
['script-chapter'] = true,
['script-title'] = true,
['season'] = true,
['section'] = true,
['section-format'] = true,
['sections'] = true, -- cite map only
['sectionurl'] = true,
['section-url'] = true,
['section-url-access'] = true,
['series'] = true,
['serieslink'] = true,
['series-link'] = true,
['seriesno'] = true,
['series-no'] = true,
['seriesnumber'] = true,
['series-number'] = true,
['series-separator'] = true,
['sheet'] = true, -- cite map only
['sheets'] = true, -- cite map only
['ssrn'] = true,
['SSRN'] = true,
['station'] = true,
['subject'] = true,
['subjectlink'] = true,
['subject-link'] = true,
['subscription'] = true,
['surname'] = true,
['template-doc-demo'] = true,
['time'] = true,
['timecaption'] = true,
['time-caption'] = true,
['title'] = true,
['titlelink'] = true,
['title-link'] = true,
['trans-chapter'] = true,
['trans-map'] = true,
['transcript'] = true,
['transcript-format'] = true,
['transcripturl'] = true,
['transcript-url'] = true,
['trans-title'] = true,
['translator'] = true,
['translator-first'] = true,
['translator-last'] = true,
['translator-given'] = true,
['translator-surname'] = true,
['translator-link'] = true,
['translator-mask'] = true,
['type'] = true,
['url'] = true,
['URL'] = true,
['url-access'] = true,
['url-status'] = false, -- поддерживается в enwiki, но не в рувики
['vauthors'] = true,
['veditors'] = true,
['version'] = true,
['via'] = true,
['volume'] = true,
['website'] = true,
['work'] = true,
['year'] = true,
['zbl'] = true,
['ZBL'] = true,
}
local numbered_arguments = {
['author#'] = true,
['author-first#'] = true,
['author#-first'] = true,
['author-last#'] = true,
['author#-last'] = true,
['author-link#'] = true,
['author#link'] = true,
['author#-link'] = true,
['authorlink#'] = true,
['author-mask#'] = true,
['author#mask'] = true,
['author#-mask'] = true,
['authormask#'] = true,
['contributor#'] = true,
['contributor-first#'] = true,
['contributor#-first'] = true,
['contributor-last#'] = true,
['contributor#-last'] = true,
['contributor-given#'] = true,
['contributor#-given'] = true,
['contributor-surname#'] = true,
['contributor#-surname'] = true,
['contributor-link#'] = true,
['contributor#-link'] = true,
['contributor-mask#'] = true,
['contributor#-mask'] = true,
['editor#'] = true,
['editor-first#'] = true,
['editor#-first'] = true,
['editor#-given'] = true,
['editor-given#'] = true,
['editor-last#'] = true,
['editor#-last'] = true,
['editor-link#'] = true,
['editor#link'] = true,
['editor#-link'] = true,
['editorlink#'] = true,
['editor-mask#'] = true,
['editor#mask'] = true,
['editor#-mask'] = true,
['editormask#'] = true,
['editor#-surname'] = true,
['editor-surname#'] = true,
['first#'] = true,
['given#'] = true,
['interviewer#'] = true,
['interviewer-first#'] = true,
['interviewer#-first'] = true,
['interviewer-last#'] = true,
['interviewer#-last'] = true,
['interviewer-link#'] = true,
['interviewer#-link'] = true,
['interviewer-mask#'] = true,
['interviewer#-mask'] = true,
['last#'] = true,
['subject#'] = true,
['subject-link#'] = true,
['subject#link'] = true,
['subject#-link'] = true,
['subjectlink#'] = true,
['surname#'] = true,
['translator#'] = true,
['translator-first#'] = true,
['translator#-first'] = true,
['translator-last#'] = true,
['translator#-last'] = true,
['translator-given#'] = true,
['translator#-given'] = true,
['translator-surname#'] = true,
['translator#-surname'] = true,
['translator-link#'] = true,
['translator#-link'] = true,
['translator-mask#'] = true,
['translator#-mask'] = true,
}
--[[--------------------------< C I T E A R X I V S U P P O R T E D P A R A M E T E R S >----------------
Cite arXiv uses the limited set of parameters defined in the limited_basic_arguments and limited_numbered_arguments
tables. Those lists are supplemented with this list of parameters that are exclusive to cite arXiv but not supported
by other cs1 templates that use the limited parameter set.
Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values:
true - these parameters are valid and supported parameters
false - these parameters are deprecated but still supported
nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter)
]]
--[[
This is a list of parameters that once were but now are no longer supported:
['ARXIV'] = nil, -- not an initialization
['version'] = nil, -- this is the cite arxiv parameter; |version= still supported by other cs1|2 templates
]]
local arxiv_basic_arguments = {
['arxiv'] = true, -- cite arxiv and arxiv identifiers
['class'] = true, -- cite arxiv only
['eprint'] = true, -- cite arxiv and arxiv identifiers
}
--[[--------------------------< C I T E B I O R X I V S U P P O R T E D P A R A M E T E R S >------------
Cite biorxiv uses the limited set of parameters defined in the limited_basic_arguments and limited_numbered_arguments
tables. Those lists are supplemented with this list of parameters that are exclusive to cite biorxiv but not supported
by other cs1 templates that use the limited parameter set.
Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values:
true - these parameters are valid and supported parameters
false - these parameters are deprecated but still supported
nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter)
]]
local biorxiv_basic_arguments = {
['biorxiv'] = true,
}
--[[--------------------------< C I T E C I T E S E E R X S U P P O R T E D P A R A M E T E R S >--------
Cite citeseerx uses the limited set of parameters defined in the limited_basic_arguments and limited_numbered_arguments
tables. Those lists are supplemented with this list of parameters that are exclusive to cite citeseerx but not supported
by other cs1 templates that use the limited parameter set.
Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values:
true - these parameters are valid and supported parameters
false - these parameters are deprecated but still supported
nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter)
]]
local citeseerx_basic_arguments = {
['citeseerx'] = true,
}
--[[--------------------------< L I M I T E D S U P P O R T E D P A R A M E T E R S >----------------------
This is an experiment that attempts to use validate() and a limited list of valid parameters to validate the
parameters provided in a cite arxiv, cite biorxiv, or cite citeseerx templates. These parameters are common to
all three templates
Because a steady-state signal conveys no useful information, whitelist.basic_arguments[] list items can have three values:
true - these parameters are valid and supported parameters
false - these parameters are deprecated but still supported
nil - these parameters are no longer supported (when setting a parameter to nil, leave a comment stating the reasons for invalidating the parameter)
]]
local limited_basic_arguments = {
['at'] = true,
['author'] = true,
['author-first'] = true,
['author-last'] = true,
['authorlink'] = true,
['author-link'] = true,
['authormask'] = true,
['author-mask'] = true,
['authors'] = true,
['collaboration'] = true,
['date'] = true,
['df'] = true,
['display-authors'] = true,
['first'] = true,
['given'] = true,
['language'] = true,
['last'] = true,
['lastauthoramp'] = true,
['last-author-amp'] = true,
['mode'] = true,
['name-list-format'] = true,
['nocat'] = true,
['no-cat'] = true,
['notracking'] = true,
['no-tracking'] = true,
['p'] = true,
['page'] = true,
['pages'] = true,
['postscript'] = true,
['pp'] = true,
['quotation'] = true,
['quote'] = true,
['ref'] = true,
['surname'] = true,
['template-doc-demo'] = true,
['title'] = true,
['url'] = true,
['URL'] = true,
['vauthors'] = true,
['year'] = true,
}
local limited_numbered_arguments = {
['author#'] = true,
['author-first#'] = true,
['author#-first'] = true,
['author-last#'] = true,
['author#-last'] = true,
['author-link#'] = true,
['author#link'] = true,
['author#-link'] = true,
['authorlink#'] = true,
['author-mask#'] = true,
['author#mask'] = true,
['author#-mask'] = true,
['authormask#'] = true,
['first#'] = true,
['given#'] = true,
['last#'] = true,
['surname#'] = true,
}
return {
basic_arguments = basic_arguments,
numbered_arguments = numbered_arguments,
limited_basic_arguments = limited_basic_arguments,
limited_numbered_arguments = limited_numbered_arguments,
arxiv_basic_arguments = arxiv_basic_arguments,
biorxiv_basic_arguments = biorxiv_basic_arguments,
citeseerx_basic_arguments = citeseerx_basic_arguments
};
43ad49dec3d1bf9116ce33cd1833daa352956d34
Модуль:Citation/CS1/Utilities
828
12
15
2022-07-19T12:32:28Z
CyberTailor
2
import module
Scribunto
text/plain
local z = {
error_categories = {}; -- for categorizing citations that contain errors
error_ids = {};
message_tail = {};
maintenance_cats = {}; -- for categorizing citations that aren't erroneous per se, but could use a little work
properties_cats = {}; -- for categorizing citations based on certain properties, language of source for instance
};
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.
]]
local function is_set( var )
return not (var == nil or var == '');
end
--[[--------------------------< I N _ A R R A Y >--------------------------------------------------------------
Whether needle is in haystack
]]
local function in_array( needle, haystack )
if needle == nil then
return false;
end
for n,v in ipairs( haystack ) do
if v == needle then
return n;
end
end
return false;
end
--[[--------------------------< S U B S T I T U T E >----------------------------------------------------------
Populates numbered arguments in a message string using an argument table.
]]
local function substitute( msg, args )
return args and mw.message.newRawMessage( msg, args ):plain() or msg;
end
--[[--------------------------< E R R O R _ C O M M E N T >----------------------------------------------------
Wraps error messages with css markup according to the state of hidden.
]]
local function error_comment( content, hidden )
return substitute( hidden and cfg.presentation['hidden-error'] or cfg.presentation['visible-error'], content );
end
--[=[-------------------------< M A K E _ W I K I L I N K >----------------------------------------------------
Makes a wikilink; when bot link and display text is provided, returns a wikilink in the form [[L|D]]; if only
link is provided, returns a wikilink in the form [[L]]; if neither are provided or link is omitted, returns an
empty string.
]=]
local function make_wikilink (link, display)
if is_set (link) then
if is_set (display) then
return table.concat ({'[[', link, '|', display, ']]'});
else
return table.concat ({'[[', link, ']]'});
end
else
return '';
end
end
--[[--------------------------< S E T _ E R R O R >--------------------------------------------------------------
Sets an error condition and returns the appropriate error message. The actual placement of the error message in the output is
the responsibility of the calling function.
]]
local function set_error( error_id, arguments, raw, prefix, suffix )
local error_state = cfg.error_conditions[ error_id ];
prefix = prefix or "";
suffix = suffix or "";
if error_state == nil then
error( cfg.messages['undefined_error'] ); -- because missing error handler in Module:Citation/CS1/Configuration
elseif is_set( error_state.category ) then
table.insert( z.error_categories, error_state.category );
end
local message = substitute( error_state.message, arguments );
message = table.concat (
{
message,
' (',
make_wikilink (
table.concat (
{
cfg.messages['help page link'],
'#',
error_state.anchor
}),
cfg.messages['help page label']),
')'
});
z.error_ids[ error_id ] = true;
if in_array( error_id, { 'bare_url_missing_title', 'trans_missing_title' } )
and z.error_ids['citation_missing_title'] then
return '', false;
end
message = table.concat({ prefix, message, suffix });
if raw == true then
return message, error_state.hidden;
end
return error_comment( message, error_state.hidden );
end
--[[-------------------------< I S _ A L I A S _ U S E D >-----------------------------------------------------
This function is used by select_one() to determine if one of a list of alias parameters is in the argument list
provided by the template.
Input:
args – pointer to the arguments table from calling template
alias – one of the list of possible aliases in the aliases lists from Module:Citation/CS1/Configuration
index – for enumerated parameters, identifies which one
enumerated – true/false flag used choose how enumerated aliases are examined
value – value associated with an alias that has previously been selected; nil if not yet selected
selected – the alias that has previously been selected; nil if not yet selected
error_list – list of aliases that are duplicates of the alias already selected
Returns:
value – value associated with alias we selected or that was previously selected or nil if an alias not yet selected
selected – the alias we selected or the alias that was previously selected or nil if an alias not yet selected
]]
local function is_alias_used (args, alias, index, enumerated, value, selected, error_list)
if enumerated then -- is this a test for an enumerated parameters?
alias = alias:gsub ('#', index); -- replace '#' with the value in index
else
alias = alias:gsub ('#', ''); -- remove '#' if it exists
end
if is_set(args[alias]) then -- alias is in the template's argument list
if value ~= nil and selected ~= alias then -- if we have already selected one of the aliases
local skip;
for _, v in ipairs(error_list) do -- spin through the error list to see if we've added this alias
if v == alias then
skip = true;
break; -- has been added so stop looking
end
end
if not skip then -- has not been added so
table.insert( error_list, alias ); -- add error alias to the error list
end
else
value = args[alias]; -- not yet selected an alias, so select this one
selected = alias;
end
end
return value, selected; -- return newly selected alias, or previously selected alias
end
--[[--------------------------< A D D _ M A I N T _ C A T >------------------------------------------------------
Adds a category to z.maintenance_cats using names from the configuration file with additional text if any.
To prevent duplication, the added_maint_cats table lists the categories by key that have been added to z.maintenance_cats.
]]
local added_maint_cats = {} -- list of maintenance categories that have been added to z.maintenance_cats
local function add_maint_cat (key, arguments)
if not added_maint_cats [key] then
added_maint_cats [key] = true; -- note that we've added this category
table.insert( z.maintenance_cats, substitute (cfg.maint_cats [key], arguments)); -- make name then add to table
end
end
--[[--------------------------< S A F E _ F O R _ I T A L I C S >----------------------------------------------
Protects a string that will be wrapped in wiki italic markup '' ... ''
Note: We cannot use <i> for italics, as the expected behavior for italics specified by ''...'' in the title is that
they will be inverted (i.e. unitalicized) in the resulting references. In addition, <i> and '' tend to interact
poorly under Mediawiki's HTML tidy.
]]
local function safe_for_italics( str )
if not is_set(str) then
return str;
else
if str:sub(1,1) == "'" then str = "<span></span>" .. str; end
if str:sub(-1,-1) == "'" then str = str .. "<span></span>"; end
-- Remove newlines as they break italics.
return str:gsub( '\n', ' ' );
end
end
--[[--------------------------< W R A P _ S T Y L E >----------------------------------------------------------
Applies styling to various parameters. Supplied string is wrapped using a message_list configuration taking one
argument; protects italic styled parameters. Additional text taken from citation_config.presentation - the reason
this function is similar to but separate from wrap_msg().
]]
local function wrap_style (key, str)
if not is_set( str ) then
return "";
elseif in_array( key, { 'italic-title', 'trans-italic-title' } ) then
str = safe_for_italics( str );
end
return substitute( cfg.presentation[key], {str} );
end
--[[--------------------------< S E L E C T _ O N E >----------------------------------------------------------
Chooses one matching parameter from a list of parameters to consider. The list of parameters to consider is just
names. For parameters that may be enumerated, the position of the numerator in the parameter name is identified
by the '#' so |author-last1= and |author1-last= are represented as 'author-last#' and 'author#-last'.
Because enumerated parameter |<param>1= is an alias of |<param>= we must test for both possibilities.
Generates an error if more than one match is present.
]]
local function select_one( args, aliases_list, error_condition, index )
local value = nil; -- the value assigned to the selected parameter
local selected = ''; -- the name of the parameter we have chosen
local error_list = {};
if index ~= nil then index = tostring(index); end
for _, alias in ipairs( aliases_list ) do -- for each alias in the aliases list
if alias:match ('#') then -- if this alias can be enumerated
if '1' == index then -- when index is 1 test for enumerated and non-enumerated aliases
value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); -- first test for non-enumerated alias
end
value, selected = is_alias_used (args, alias, index, true, value, selected, error_list); -- test for enumerated alias
else
value, selected = is_alias_used (args, alias, index, false, value, selected, error_list); --test for non-enumerated alias
end
end
if #error_list > 0 and 'none' ~= error_condition then -- for cases where this code is used outside of extract_names()
local error_str = "";
for _, k in ipairs( error_list ) do
if error_str ~= "" then error_str = error_str .. cfg.messages['parameter-separator'] end
error_str = error_str .. wrap_style ('parameter', k);
end
if #error_list > 1 then
error_str = error_str .. cfg.messages['parameter-final-separator'];
else
error_str = error_str .. cfg.messages['parameter-pair-separator'];
end
error_str = error_str .. wrap_style ('parameter', selected);
table.insert( z.message_tail, { set_error( error_condition, {error_str}, true ) } );
end
return value, selected;
end
--[=[-------------------------< R E M O V E _ W I K I _ L I N K >----------------------------------------------
Gets the display text from a wikilink like [[A|B]] or [[B]] gives B
The str:gsub() returns either A|B froma [[A|B]] or B from [[B]] or B from B (no wikilink markup).
In l(), l:gsub() removes the link and pipe (if they exist); the second :gsub() trims white space from the label
if str was wrapped in wikilink markup. Presumably, this is because without wikimarkup in str, there is no match
in the initial gsub, the replacement function l() doesn't get called.
]=]
local function remove_wiki_link (str)
return (str:gsub( "%[%[([^%[%]]*)%]%]", function(l)
return l:gsub( "^[^|]*|(.*)$", "%1" ):gsub("^%s*(.-)%s*$", "%1");
end));
end
--[=[-------------------------< I S _ W I K I L I N K >--------------------------------------------------------
Determines if str is a wikilink, extracts, and returns the the wikilink type, link text, and display text parts.
If str is a complex wikilink ([[L|D]]):
returns wl_type 2 and D and L from [[L|D]];
if str is a simple wikilink ([[D]])
returns wl_type 1 and D from [[D]] and L as empty string;
if not a wikilink:
returns wl_type 0, str as D, and L as empty string.
trims leading and trailing white space and pipes from L and D ([[L|]] and [[|D]] are accepted by MediaWiki and
treated like [[D]]; while [[|D|]] is not accepted by MediaWiki, here, we accept it and return D without the pipes).
]=]
local function is_wikilink (str)
local D, L
local wl_type = 2; -- assume that str is a complex wikilink [[L|D]]
if not str:match ('^%[%[[^%]]+%]%]$') then -- is str some sort of a wikilink (must have some sort of content)
return 0, str, ''; -- not a wililink; return wl_type as 0, str as D, and empty string as L
end
L, D = str:match ('^%[%[([^|]+)|([^%]]+)%]%]$'); -- get L and D from [[L|D]]
if not is_set (D) then -- if no separate display
D = str:match ('^%[%[([^%]]*)|*%]%]$'); -- get D from [[D]] or [[D|]]
wl_type = 1;
end
D = mw.text.trim (D, '%s|'); -- trim white space and pipe characters
-- L = L and mw.text.trim (L, '%s|');
return wl_type, D, L or '';
end
--[[--------------------------< S T R I P _ A P O S T R O P H E _ M A R K U P >--------------------------------
Strip wiki italic and bold markup from argument so that it doesn't contaminate COinS metadata.
This function strips common patterns of apostrophe markup. We presume that editors who have taken the time to
markup a title have, as a result, provided valid markup. When they don't, some single apostrophes are left behind.
Returns the argument without wiki markup and a number; the number is more-or-less meaningless except as a flag
to indicate that markup was replaced; do not rely on it as an indicator of how many of any kind of markup was
removed; returns the argument and nil when no markup removed
]]
local function strip_apostrophe_markup (argument)
if not is_set (argument) then
return argument, nil; -- no argument, nothing to do
end
if nil == argument:find ( "''", 1, true ) then -- Is there at least one double apostrophe? If not, exit.
return argument, nil;
end
local flag;
while true do
if argument:find ( "'''''", 1, true ) then -- bold italic (5)
argument, flag=argument:gsub("%'%'%'%'%'", ""); -- remove all instances of it
elseif argument:find ( "''''", 1, true ) then -- italic start and end without content (4)
argument, flag=argument:gsub("%'%'%'%'", "");
elseif argument:find ( "'''", 1, true ) then -- bold (3)
argument, flag=argument:gsub("%'%'%'", "");
elseif argument:find ( "''", 1, true ) then -- italic (2)
argument, flag=argument:gsub("%'%'", "");
else
break;
end
end
return argument, flag; -- done
end
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
Sets local cfg table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr)
cfg = cfg_table_ptr;
end
--[[--------------------------< E X P O R T S >----------------------------------------------------------------
]]
return {
is_set = is_set, -- exported functions
in_array = in_array,
substitute = substitute,
error_comment = error_comment,
set_error = set_error,
select_one = select_one,
add_maint_cat = add_maint_cat,
wrap_style = wrap_style,
safe_for_italics = safe_for_italics,
remove_wiki_link = remove_wiki_link,
is_wikilink = is_wikilink,
make_wikilink = make_wikilink,
set_selected_modules = set_selected_modules,
strip_apostrophe_markup = strip_apostrophe_markup,
z = z, -- exported table
}
31543576ae4236d5508aadd4741c7235849f105d
Модуль:Citation/CS1/Date validation
828
13
16
2022-07-19T12:33:53Z
CyberTailor
2
import module
Scribunto
text/plain
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local is_set, in_array; -- imported functions from selected Module:Citation/CS1/Utilities
local cfg; -- table of tables imported from selected Module:Citation/CS1/Configuration
--[[--------------------------< F I L E - S C O P E D E C L A R A T I O N S >--------------------------------
File-scope variables are declared here
]]
local lang_object = mw.getContentLanguage(); -- used by is_valid_accessdate(), is_valid_year(), date_name_xlate(); TODO: move to ~/Configuration?
local year_limit; -- used by is_valid_year()
--[=[-------------------------< I S _ V A L I D _ A C C E S S D A T E >----------------------------------------
returns true if:
Wikipedia start date <= accessdate < today + 2 days
Wikipedia start date is 2001-01-15T00:00:00 UTC which is 979516800 seconds after 1970-01-01T00:00:00 UTC (the start of Unix time)
accessdate is the date provided in |accessdate= at time 00:00:00 UTC
today is the current date at time 00:00:00 UTC plus 48 hours
if today is 2015-01-01T00:00:00 then
adding 24 hours gives 2015-01-02T00:00:00 – one second more than today
adding 24 hours gives 2015-01-03T00:00:00 – one second more than tomorrow
This function does not work if it is fed month names for languages other than English. Wikimedia #time: parser
apparently doesn't understand non-Engish date month names. This function will always return false when the date
contains a non-English month name because good1 is false after the call to lang.formatDate(). To get around that
call this function with YYYY-MM-DD format dates.
]=]
local function is_valid_accessdate (accessdate)
local good1, good2;
local access_ts, tomorrow_ts; -- to hold unix time stamps representing the dates
good1, access_ts = pcall (lang_object.formatDate, lang_object, 'U', accessdate ); -- convert accessdate value to unix timesatmp
good2, tomorrow_ts = pcall (lang_object.formatDate, lang_object, 'U', 'today + 2 days' ); -- today midnight + 2 days is one second more than all day tomorrow
if good1 and good2 then -- lang.formatDate() returns a timestamp in the local script which which tonumber() may not understand
access_ts = tonumber (access_ts) or lang_object:parseFormattedNumber (access_ts); -- convert to numbers for the comparison;
tomorrow_ts = tonumber (tomorrow_ts) or lang_object:parseFormattedNumber (tomorrow_ts);
else
return false; -- one or both failed to convert to unix time stamp
end
if 979516800 <= access_ts and access_ts < tomorrow_ts then -- Wikipedia start date <= accessdate < tomorrow's date
return true;
else
return false; -- accessdate out of range
end
end
--[[--------------------------< G E T _ M O N T H _ N U M B E R >----------------------------------------------
returns a number according to the month in a date: 1 for January, etc. Capitalization and spelling must be correct. If not a valid month, returns 0
]]
local function get_month_number (month)
return cfg.date_names['local'].long[month] or cfg.date_names['local'].short[month] or -- look for local names first
cfg.date_names['en'].long[month] or cfg.date_names['en'].short[month] or -- failing that, look for English names
0; -- not a recognized month name
end
--[[--------------------------< I S _ V A L I D _ E M B A R G O _ D A T E >------------------------------------
returns true and date value if that value has proper dmy, mdy, ymd format.
returns false and 9999 (embargoed forever) when date value is not proper format; assumes that when |embargo= is
set, the editor intended to embargo a pmc but |embargo= does not hold a single date.
]]
local function is_valid_embargo_date (v)
if v:match ('^%d%d%d%d%-%d%d%-%d%d$') or -- ymd
v:match ('^%d%d?%s+%a+%s+%d%d%d%d$') or -- dmy
v:match ('^%a+%s+%d%d?%s*,%s*%d%d%d%d$') then -- mdy
return true, v;
end
return false, '9999'; -- if here not good date so return false and set embargo date to long time in future
end
--[[--------------------------< G E T _ S E A S O N _ N U M B E R >--------------------------------------------
returns a number according to the sequence of seasons in a year: 1 for Winter, etc. Capitalization and spelling must be correct. If not a valid season, returns 0
Uses ISO DIS 8601 2016 part 2 §4.7 Divisions of a year for hemishpere-independent seasons:
21-24 = Spring, Summer, Autumn, Winter, independent of “Hemisphere”
These additional divisions not currently supported:
25-28 = Spring - Northern Hemisphere, Summer- Northern Hemisphere, Autumn - Northern Hemisphere, Winter - Northern Hemisphere
29-32 = Spring – Southern Hemisphere, Summer– Southern Hemisphere, Autumn – Southern Hemisphere, Winter - Southern Hemisphere
33-36 = Quarter 1, Quarter 2, Quarter 3, Quarter 4 (3 months each)
37-39 = Quadrimester 1, Quadrimester 2, Quadrimester 3 (4 months each)
40-41 = Semestral 1, Semestral-2 (6 months each)
]]
local function get_season_number (season)
return cfg.date_names['local'].season[season] or -- look for local names first
cfg.date_names['en'].season[season] or -- failing that, look for English names
0; -- not a recognized season name
end
--[[--------------------------< I S _ P R O P E R _ N A M E >--------------------------------------------------
returns a non-zero number if date contains a recognized proper name. Capitalization and spelling must be correct.
]]
local function is_proper_name (name)
return cfg.date_names['local'].named[name] or -- look for local names dates first
cfg.date_names['en'].named[name] or -- failing that, look for English names
0; -- not a recognized named date
end
--[[--------------------------< I S _ V A L I D _ M O N T H _ O R _ S E A S O N >------------------------------
--returns true if month or season is valid (properly spelled, capitalized, abbreviated)
]]
local function is_valid_month_or_season (month_season)
if 0 == get_month_number (month_season) then -- if month text isn't one of the twelve months, might be a season
if 0 == get_season_number (month_season) then -- not a month, is it a season?
return false; -- return false not a month or one of the five seasons
end
end
return true;
end
--[[--------------------------< I S _ V A L I D _ Y E A R >----------------------------------------------------
Function gets current year from the server and compares it to year from a citation parameter. Years more than one year in the future are not acceptable.
]]
local function is_valid_year(year)
if not is_set(year_limit) then
year_limit = tonumber(os.date("%Y"))+1; -- global variable so we only have to fetch it once
end
year = tonumber (year) or lang_object:parseFormattedNumber (year); -- convert to numbers for the comparison;
return year and (year <= year_limit) or false;
end
--[[--------------------------< I S _ V A L I D _ D A T E >----------------------------------------------------
Returns true if day is less than or equal to the number of days in month and year is no farther into the future
than next year; else returns false.
Assumes Julian calendar prior to year 1582 and Gregorian calendar thereafter. Accounts for Julian calendar leap
years before 1582 and Gregorian leap years after 1582. Where the two calendars overlap (1582 to approximately
1923) dates are assumed to be Gregorian.
]]
local function is_valid_date (year, month, day)
local days_in_month = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
local month_length;
if not is_valid_year(year) then -- no farther into the future than next year
return false;
end
month = tonumber(month); -- required for YYYY-MM-DD dates
if (2==month) then -- if February
month_length = 28; -- then 28 days unless
if 1582 > tonumber(year) then -- Julian calendar
if 0==(year%4) then -- is a leap year?
month_length = 29; -- if leap year then 29 days in February
end
else -- Gregorian calendar
if (0==(year%4) and (0~=(year%100) or 0==(year%400))) then -- is a leap year?
month_length = 29; -- if leap year then 29 days in February
end
end
else
month_length=days_in_month[month];
end
if tonumber (day) > month_length then
return false;
end
return true;
end
--[[--------------------------< I S _ V A L I D _ M O N T H _ R A N G E _ S T Y L E >--------------------------
Months in a range are expected to have the same style: Jan–Mar or October–December but not February–Mar or Jul–August.
There is a special test for May because it can be either short or long form.
Returns true when style for both months is the same
]]
local function is_valid_month_range_style (month1, month2)
local len1 = month1:len();
local len2 = month2:len();
if len1 == len2 then
return true; -- both months are short form so return true
elseif 'May' == month1 or 'May'== month2 then
return true; -- both months are long form so return true
elseif 3 == len1 or 3 == len2 then
return false; -- months are mixed form so return false
else
return true; -- both months are long form so return true
end
end
--[[--------------------------< I S _ V A L I D _ M O N T H _ S E A S O N _ R A N G E >------------------------
Check a pair of months or seasons to see if both are valid members of a month or season pair.
Month pairs are expected to be left to right, earliest to latest in time.
All season ranges are accepted as valid because there are publishers out there who have published a Summer–Spring YYYY issue so ... ok
]]
local function is_valid_month_season_range(range_start, range_end)
local range_start_number = get_month_number (range_start);
local range_end_number;
if 0 == range_start_number then -- is this a month range?
range_start_number = get_season_number (range_start); -- not a month; is it a season? get start season number
range_end_number = get_season_number (range_end); -- get end season number
if (0 ~= range_start_number) and (0 ~= range_end_number) then
return true; -- any season pairing is accepted
end
return false; -- range_start and/or range_end is not a season
end
-- here when range_start is a month
range_end_number = get_month_number (range_end); -- get end month number
if range_start_number < range_end_number then -- range_start is a month; does range_start precede range_end?
if is_valid_month_range_style (range_start, range_end) then -- do months have the same style?
return true; -- proper order and same style
end
end
return false; -- range_start month number is greater than or equal to range end number; or range end isn't a month
end
--[[--------------------------< M A K E _ C O I N S _ D A T E >------------------------------------------------
This function receives a table of date parts for one or two dates and an empty table reference declared in
Module:Citation/CS1. The function is called only for |date= parameters and only if the |date=<value> is
determined to be a valid date format. The question of what to do with invalid date formats is not answered here.
The date parts in the input table are converted to an ISO 8601 conforming date string:
single whole dates: yyyy-mm-dd
month and year dates: yyyy-mm
year dates: yyyy
ranges: yyyy-mm-dd/yyyy-mm-dd
yyyy-mm/yyyy-mm
yyyy/yyyy
Dates in the Julian calendar are reduced to year or year/year so that we don't have to do calendar conversion from
Julian to Proleptic Gregorian.
The input table has:
year, year2 – always present; if before 1582, ignore months and days if present
month, month2 – 0 if not provided, 1-12 for months, 21-24 for seasons; 99 Christmas
day, day2 – 0 if not provided, 1-31 for days
the output table receives:
rftdate: an IS8601 formatted date
rftchron: a free-form version of the date, usually without year which is in rftdate (season ranges and propername dates)
rftssn: one of four season keywords: winter, spring, summer, fall (lowercase)
]]
local function make_COinS_date (input, tCOinS_date)
local date; -- one date or first date in a range
local date2 = ''; -- end of range date
-- start temporary Julian / Gregorian calendar uncertainty detection
local year = tonumber(input.year); -- this temporary code to determine the extent of sources dated to the Julian/Gregorian
local month = tonumber(input.month); -- interstice 1 October 1582 – 1 January 1926
local day = tonumber (input.day);
if (0 ~= day) and -- day must have a value for this to be a whole date
(((1582 == year) and (10 <= month) and (12 >= month)) or -- any whole 1582 date from 1 october to 31 December or
((1926 == year) and (1 == month) and (1 == input.day)) or -- 1 January 1926 or
((1582 < year) and (1925 >= year))) then -- any date 1 January 1583 – 31 December 1925
tCOinS_date.inter_cal_cat = true; -- set category flag true
end
-- end temporary Julian / Gergorian calendar uncertainty detection
if 1582 > tonumber(input.year) or 20 < tonumber(input.month) then -- Julian calendar or season so &rft.date gets year only
date = input.year;
if 0 ~= input.year2 and input.year ~= input.year2 then -- if a range, only the second year portion when not the same as range start year
date = string.format ('%.4d/%.4d', tonumber(input.year), tonumber(input.year2)) -- assemble the date range
end
if 20 < tonumber(input.month) then -- if season or propername date
local season = {[24]='winter', [21]='spring', [22]='summer', [23]='fall', [99]='Christmas'}; -- seasons lowercase, no autumn; proper names use title case
if 0 == input.month2 then -- single season date
if 30 <tonumber(input.month) then
tCOinS_date.rftchron = season[input.month]; -- proper name dates
else
tCOinS_date.rftssn = season[input.month]; -- seasons
end
else -- season range with a second season specified
if input.year ~= input.year2 then -- season year – season year range or season year–year
tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this?
if 0~= input.month2 then
tCOinS_date.rftchron = string.format ('%s %s – %s %s', season[input.month], input.year, season[input.month2], input.year2);
end
else -- season–season year range
tCOinS_date.rftssn = season[input.month]; -- start of range season; keep this?
tCOinS_date.rftchron = season[input.month] .. '–' .. season[input.month2]; -- season–season year range
end
end
end
tCOinS_date.rftdate = date;
return; -- done
end
if 0 ~= input.day then
date = string.format ('%s-%.2d-%.2d', input.year, tonumber(input.month), tonumber(input.day)); -- whole date
elseif 0 ~= input.month then
date = string.format ('%s-%.2d', input.year, tonumber(input.month)); -- year and month
else
date = string.format ('%s', input.year); -- just year
end
if 0 ~= input.year2 then
if 0 ~= input.day2 then
date2 = string.format ('/%s-%.2d-%.2d', input.year2, tonumber(input.month2), tonumber(input.day2)); -- whole date
elseif 0 ~= input.month2 then
date2 = string.format ('/%s-%.2d', input.year2, tonumber(input.month2)); -- year and month
else
date2 = string.format ('/%s', input.year2); -- just year
end
end
tCOinS_date.rftdate = date .. date2; -- date2 has the '/' separator
return;
end
--[[--------------------------< P A T T E R N S >--------------------------------------------------------------
this is the list of patterns for date formats that this module recognizes. Approximately the first half of these
patterns represent formats that might be reformatted into another format. Those that might be reformatted have
'indicator' letters that identify the content of the matching capture: 'd' (day), 'm' (month), 'a' (anchor year),
'y' (year); second day, month, year have a '2' suffix.
These patterns are used for both date validation and for reformatting. This table should not be moved to ~/Configuration
because changes to this table require changes to check_date() and to reformatter() and reformat_date()
]]
local patterns = {
-- year-initial numerical year-month-day
['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'},
-- month-initial: month day, year
['Mdy'] = {'^(%D-) +([1-9]%d?), +((%d%d%d%d?)%a?)$', 'm', 'd', 'a', 'y'},
-- month-initial day range: month day–day, year; days are separated by endash
['Md-dy'] = {'^(%D-) +([1-9]%d?)[%-–]([1-9]%d?), +((%d%d%d%d)%a?)$', 'm', 'd', 'd2', 'a', 'y'},
-- day-initial: day month year
['dMy'] = {'^([1-9]%d?) *(%D-) +((%d%d%d%d?)%a?)$', 'd', 'm', 'a', 'y'},
-- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed; not supported at en.wiki
-- ['yMd'] = {'^((%d%d%d%d?)%a?) +(%D-) +(%d%d?)$', 'a', 'y', 'm', 'd'},
-- day-range-initial: day–day month year; days are separated by endash
['d-dMy'] = {'^([1-9]%d?)[%-–]([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'd2', 'm', 'a', 'y'},
-- day initial month-day-range: day month - day month year; uses spaced endash
['dM-dMy'] = {'^([1-9]%d?) +(%D-) +[%-–] +([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'm', 'd2', 'm2', 'a', 'y'},
-- month initial month-day-range: month day – month day, year; uses spaced endash
['Md-Mdy'] = {'^(%D-) +([1-9]%d?) +[%-–] +(%D-) +([1-9]%d?), +((%d%d%d%d)%a?)$','m', 'd', 'm2', 'd2', 'a', 'y'},
-- day initial month-day-year-range: day month year - day month year; uses spaced endash
['dMy-dMy'] = {'^([1-9]%d?) +(%D-) +(%d%d%d%d) +[%-–] +([1-9]%d?) +(%D-) +((%d%d%d%d)%a?)$', 'd', 'm', 'y', 'd2', 'm2', 'a', 'y2'},
-- month initial month-day-year-range: month day, year – month day, year; uses spaced endash
['Mdy-Mdy'] = {'^(%D-) +([1-9]%d?), +(%d%d%d%d) +[%-–] +(%D-) +([1-9]%d?), +((%d%d%d%d)%a?)$', 'm', 'd', 'y', 'm2', 'd2', 'a', 'y2'},
-- these date formats cannot be converted, per se, but month name can be rendered short or long
-- month/season year - month/season year; separated by spaced endash
['My-My'] = {'^(%D-) +(%d%d%d%d) +[%-–] +(%D-) +((%d%d%d%d)%a?)$', 'm', 'y', 'm2', 'a', 'y2'},
-- month/season range year; months separated by endash
['M-My'] = {'^(%D-)[%-–](%D-) +((%d%d%d%d)%a?)$', 'm', 'm2', 'a', 'y'},
-- month/season year or proper-name year
['My'] = {'^([^%d–]-) +((%d%d%d%d)%a?)$', 'm', 'a', 'y'}, -- this way because endash is a member of %D; %D- will match January–March 2019 when it shouldn't
-- these date formats cannot be converted
['Sy4-y2'] = {'^(%D-) +((%d%d)%d%d)[%-–]((%d%d)%a?)$'}, -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash
['Sy-y'] = {'^(%D-) +(%d%d%d%d)[%-–]((%d%d%d%d)%a?)$'}, -- special case Winter/Summer year-year; year separated with unspaced endash
['y-y'] = {'^(%d%d%d%d?)[%-–]((%d%d%d%d?)%a?)$'}, -- year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999
['y4-y2'] = {'^((%d%d)%d%d)[%-–]((%d%d)%a?)$'}, -- year range: YYYY–YY; separated by unspaced endash
['y'] = {'^((%d%d%d%d?)%a?)$'}, -- year; here accept either YYY or YYYY
}
--[[--------------------------< C H E C K _ D A T E >----------------------------------------------------------
Check date format to see that it is one of the formats approved by WP:DATESNO or WP:DATERANGE. Exception: only
allowed range separator is endash. Additionally, check the date to see that it is a real date: no 31 in 30-day
months; no 29 February when not a leap year. Months, both long-form and three character abbreviations, and seasons
must be spelled correctly. Future years beyond next year are not allowed.
If the date fails the format tests, this function returns false and does not return values for anchor_year and
COinS_date. When this happens, the date parameter is used in the COinS metadata and the CITEREF identifier gets
its year from the year parameter if present otherwise CITEREF does not get a date value.
Inputs:
date_string - date string from date-holding parameters (date, year, accessdate, embargo, archivedate, etc.)
Returns:
false if date string is not a real date; else
true, anchor_year, COinS_date
anchor_year can be used in CITEREF anchors
COinS_date is ISO 8601 format date; see make_COInS_date()
]]
local function check_date (date_string, tCOinS_date, test_accessdate)
local year; -- assume that year2, months, and days are not used;
local year2=0; -- second year in a year range
local month=0;
local month2=0; -- second month in a month range
local day=0;
local day2=0; -- second day in a day range
local anchor_year;
local coins_date;
if date_string:match (patterns['ymd'][1]) then -- year-initial numerical year month day format
year, month, day=date_string:match (patterns['ymd'][1]);
if 12 < tonumber(month) or 1 > tonumber(month) or 1582 > tonumber(year) or 0 == tonumber(day) then return false; end -- month or day number not valid or not Gregorian calendar
anchor_year = year;
elseif mw.ustring.match(date_string, patterns['Mdy'][1]) then -- month-initial: month day, year
month, day, anchor_year, year=mw.ustring.match(date_string, patterns['Mdy'][1]);
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
elseif mw.ustring.match(date_string, patterns['Md-dy'][1]) then -- month-initial day range: month day–day, year; days are separated by endash
month, day, day2, anchor_year, year=mw.ustring.match(date_string, patterns['Md-dy'][1]);
if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same;
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
month2=month; -- for metadata
year2=year;
elseif mw.ustring.match(date_string, patterns['dMy'][1]) then -- day-initial: day month year
day, month, anchor_year, year=mw.ustring.match(date_string, patterns['dMy'][1]);
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
--[[ NOT supported at en.wiki
elseif mw.ustring.match(date_string, patterns['yMd'][1]) then -- year-initial: year month day; day: 1 or 2 two digits, leading zero allowed
anchor_year, year, month, day=mw.ustring.match(date_string, patterns['yMd'][1]);
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
-- end NOT supported at en.wiki ]]
elseif mw.ustring.match(date_string, patterns['d-dMy'][1]) then -- day-range-initial: day–day month year; days are separated by endash
day, day2, month, anchor_year, year=mw.ustring.match(date_string, patterns['d-dMy'][1]);
if tonumber(day) >= tonumber(day2) then return false; end -- date range order is left to right: earlier to later; dates may not be the same;
month = get_month_number (month);
if 0 == month then return false; end -- return false if month text isn't one of the twelve months
month2=month; -- for metadata
year2=year;
elseif mw.ustring.match(date_string, patterns['dM-dMy'][1]) then -- day initial month-day-range: day month - day month year; uses spaced endash
day, month, day2, month2, anchor_year, year=mw.ustring.match(date_string, patterns['dM-dMy'][1]);
if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end -- date range order is left to right: earlier to later;
month = get_month_number (month); -- for metadata
month2 = get_month_number (month2);
year2=year;
elseif mw.ustring.match(date_string, patterns['Md-Mdy'][1]) then -- month initial month-day-range: month day – month day, year; uses spaced endash
month, day, month2, day2, anchor_year, year=mw.ustring.match(date_string, patterns['Md-Mdy'][1]);
if (not is_valid_month_season_range(month, month2)) or not is_valid_year(year) then return false; end
month = get_month_number (month); -- for metadata
month2 = get_month_number (month2);
year2=year;
elseif mw.ustring.match(date_string, patterns['dMy-dMy'][1]) then -- day initial month-day-year-range: day month year - day month year; uses spaced endash
day, month, year, day2, month2, anchor_year, year2=mw.ustring.match(date_string, patterns['dMy-dMy'][1]);
if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style
month = get_month_number (month); -- for metadata
month2 = get_month_number (month2);
elseif mw.ustring.match(date_string, patterns['Mdy-Mdy'][1]) then -- month initial month-day-year-range: month day, year – month day, year; uses spaced endash
month, day, year, month2, day2, anchor_year, year2=mw.ustring.match(date_string, patterns['Mdy-Mdy'][1]);
if tonumber(year2) <= tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) or not is_valid_month_range_style(month, month2) then return false; end -- year2 no more than one year in the future; months same style
month = get_month_number (month); -- for metadata
month2 = get_month_number (month2);
elseif mw.ustring.match(date_string, patterns['Sy4-y2'][1]) then -- special case Winter/Summer year-year (YYYY-YY); year separated with unspaced endash
local century;
month, year, century, anchor_year, year2=mw.ustring.match(date_string, patterns['Sy4-y2'][1]);
if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer
anchor_year=year..'–'..anchor_year; -- assemble anchor_year from both years
year2 = century..year2; -- add the century to year2 for comparisons
if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
month = get_season_number (month);
elseif mw.ustring.match(date_string, patterns['Sy-y'][1]) then -- special case Winter/Summer year-year; year separated with unspaced endash
month, year, anchor_year, year2=mw.ustring.match(date_string, patterns['Sy-y'][1]);
if 'Winter' ~= month and 'Summer' ~= month then return false end; -- 'month' can only be Winter or Summer
anchor_year=year..'–'..anchor_year; -- assemble anchor_year from both years
if 1 ~= tonumber(year2) - tonumber(year) then return false; end -- must be sequential years, left to right, earlier to later
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
month = get_season_number (month); -- for metadata
elseif mw.ustring.match(date_string, patterns['My-My'][1]) then -- month/season year - month/season year; separated by spaced endash
month, year, month2, anchor_year, year2=mw.ustring.match(date_string, patterns['My-My'][1]);
anchor_year=year..'–'..anchor_year; -- assemble anchor_year from both years
if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
if 0 ~= get_month_number(month) and 0 ~= get_month_number(month2) and is_valid_month_range_style(month, month2) then -- both must be month year, same month style
month = get_month_number(month);
month2 = get_month_number(month2);
elseif 0 ~= get_season_number(month) and 0 ~= get_season_number(month2) then -- both must be or season year, not mixed
month = get_season_number(month);
month2 = get_season_number(month2);
else
return false;
end
elseif mw.ustring.match(date_string, patterns['M-My'][1]) then -- month/season range year; months separated by endash
month, month2, anchor_year, year=mw.ustring.match(date_string, patterns['M-My'][1]);
if (not is_valid_month_season_range(month, month2)) or (not is_valid_year(year)) then return false; end
if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season
month = get_month_number(month);
month2 = get_month_number(month2);
else
month = get_season_number(month);
month2 = get_season_number(month2);
end
year2=year;
elseif mw.ustring.match(date_string, patterns['My'][1]) then -- month/season year or proper-name year
month, anchor_year, year=mw.ustring.match(date_string, patterns['My'][1]);
if not is_valid_year(year) then return false; end
if not is_valid_month_or_season (month) and 0 == is_proper_name (month) then return false; end
if 0 ~= get_month_number(month) then -- determined to be a valid range so just check this one to know if month or season
month = get_month_number(month);
elseif 0 ~= get_season_number(month) then
month = get_season_number(month);
else
month = is_proper_name (month); -- must be proper name; not supported in COinS
end
elseif mw.ustring.match(date_string, patterns['y-y'][1]) then -- Year range: YYY-YYY or YYY-YYYY or YYYY–YYYY; separated by unspaced endash; 100-9999
year, anchor_year, year2=mw.ustring.match(date_string, patterns['y-y'][1]);
anchor_year=year..'–'..anchor_year; -- assemble anchor year from both years
if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
elseif mw.ustring.match(date_string, patterns['y4-y2'][1]) then -- Year range: YYYY–YY; separated by unspaced endash
local century;
year, century, anchor_year, year2=mw.ustring.match(date_string, patterns['y4-y2'][1]);
anchor_year=year..'–'..anchor_year; -- assemble anchor year from both years
if 13 > tonumber(year2) then return false; end -- don't allow 2003-05 which might be May 2003
year2 = century..year2; -- add the century to year2 for comparisons
if tonumber(year) >= tonumber(year2) then return false; end -- left to right, earlier to later, not the same
if not is_valid_year(year2) then return false; end -- no year farther in the future than next year
elseif mw.ustring.match (date_string, patterns['y'][1]) then -- year; here accept either YYY or YYYY
anchor_year, year=mw.ustring.match (date_string, patterns['y'][1]);
if false == is_valid_year(year) then
return false;
end
else
return false; -- date format not one of the MOS:DATE approved formats
end
if test_accessdate then -- test accessdate here because we have numerical date parts
if 0 ~= year and 0 ~= month and 0 ~= day and -- all parts of a single date required
0 == year2 and 0 == month2 and 0 == day2 then -- none of these; accessdate must not be a range
if not is_valid_accessdate (year..'-'..month..'-'..day) then
return false; -- return false when accessdate out of bounds
end
else
return false; -- return false when accessdate is a range of two dates
end
end
local result=true; -- check whole dates for validity; assume true because not all dates will go through this test
if 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 == day2 then -- YMD (simple whole date)
result=is_valid_date(year,month,day);
elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 == month2 and 0 ~= day2 then -- YMD-d (day range)
result=is_valid_date(year,month,day);
result=result and is_valid_date(year,month,day2);
elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 == year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-md (day month range)
result=is_valid_date(year,month,day);
result=result and is_valid_date(year,month2,day2);
elseif 0 ~= year and 0 ~= month and 0 ~= day and 0 ~= year2 and 0 ~= month2 and 0 ~= day2 then -- YMD-ymd (day month year range)
result=is_valid_date(year,month,day);
result=result and is_valid_date(year2,month2,day2);
end
if false == result then return false; end
if nil ~= tCOinS_date then -- this table only passed into this function when testing |date= parameter values
make_COinS_date ({year=year, month=month, day=day, year2=year2, month2=month2, day2=day2}, tCOinS_date); -- make an ISO 8601 date string for COinS
end
return true, anchor_year; -- format is good and date string represents a real date
end
--[[--------------------------< D A T E S >--------------------------------------------------------------------
Cycle the date-holding parameters in passed table date_parameters_list through check_date() to check compliance with MOS:DATE. For all valid dates, check_date() returns
true. The |date= parameter test is unique, it is the only date holding parameter from which values for anchor_year (used in CITEREF identifiers) and COinS_date (used in
the COinS metadata) are derived. The |date= parameter is the only date-holding parameter that is allowed to contain the no-date keywords "n.d." or "nd" (without quotes).
Unlike most error messages created in this module, only one error message is created by this function. Because all of the date holding parameters are processed serially,
a single error message is created as the dates are tested.
]]
local function dates(date_parameters_list, tCOinS_date)
local anchor_year; -- will return as nil if the date being tested is not |date=
local COinS_date; -- will return as nil if the date being tested is not |date=
local embargo_date; -- if embargo date is a good dmy, mdy, ymd date then holds original value else reset to 9999
local error_message = "";
local good_date = false;
for k, v in pairs(date_parameters_list) do -- for each date-holding parameter in the list
if is_set(v.val) then -- if the parameter has a value
v.val = mw.ustring.gsub (v.val, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9
if v.val:match("^c%. [1-9]%d%d%d?%a?$") then -- special case for c. year or with or without CITEREF disambiguator - only |date= and |year=
local year = v.val:match("c%. ([1-9]%d%d%d?)%a?"); -- get the year portion so it can be tested
if 'date'==k then
anchor_year, COinS_date = v.val:match("((c%. [1-9]%d%d%d?)%a?)"); -- anchor year and COinS_date only from |date= parameter
good_date = is_valid_year(year);
elseif 'year'==k then
good_date = is_valid_year(year);
end
elseif 'date'==k then -- if the parameter is |date=
if v.val:match("^n%.d%.%a?$") then -- if |date=n.d. with or without a CITEREF disambiguator
good_date, anchor_year, COinS_date = true, v.val:match("((n%.d%.)%a?)"); --"n.d."; no error when date parameter is set to no date
elseif v.val:match("^nd%a?$") then -- if |date=nd with or without a CITEREF disambiguator
good_date, anchor_year, COinS_date = true, v.val:match("((nd)%a?)"); --"nd"; no error when date parameter is set to no date
else
good_date, anchor_year, COinS_date = check_date (v.val, tCOinS_date); -- go test the date
end
elseif 'year'==k then -- if the parameter is |year= it should hold only a year value
if v.val:match("^[1-9]%d%d%d?%a?$") then -- if |year= 3 or 4 digits only with or without a CITEREF disambiguator
good_date, anchor_year, COinS_date = true, v.val:match("((%d+)%a?)");
end
elseif 'access-date'==k then -- if the parameter is |date=
good_date = check_date (v.val, nil, true); -- go test the date; nil is a placeholder; true is the test_accessdate flag
elseif 'embargo'==k then -- if the parameter is |embargo=
good_date = check_date (v.val); -- go test the date
if true == good_date then -- if the date is a valid date
good_date, embargo_date = is_valid_embargo_date (v.val); -- is |embargo= date a single dmy, mdy, or ymd formatted date? yes:returns embargo; no: returns 9999
end
else -- any other date-holding parameter
good_date = check_date (v.val); -- go test the date
end
if false==good_date then -- assemble one error message so we don't add the tracking category multiple times
if is_set(error_message) then -- once we've added the first portion of the error message ...
error_message=error_message .. ", "; -- ... add a comma space separator
end
error_message=error_message .. "|" .. v.name .. "="; -- add the failed parameter
end
end
end
return anchor_year, embargo_date, error_message; -- and done
end
--[[--------------------------< Y E A R _ D A T E _ C H E C K >------------------------------------------------
Compare the value provided in |year= with the year value(s) provided in |date=. This function returns a numeric value:
0 - year value does not match the year value in date
1 - (default) year value matches the year value in date or one of the year values when date contains two years
2 - year value matches the year value in date when date is in the form YYYY-MM-DD and year is disambiguated (|year=YYYYx)
]]
local function year_date_check (year_string, date_string)
local year;
local date1;
local date2;
local result = 1; -- result of the test; assume that the test passes
year = year_string:match ('(%d%d%d%d?)');
if date_string:match ('%d%d%d%d%-%d%d%-%d%d') and year_string:match ('%d%d%d%d%a') then --special case where both date and year are required YYYY-MM-DD and YYYYx
date1 = date_string:match ('(%d%d%d%d)');
year = year_string:match ('(%d%d%d%d)');
if year ~= date1 then
result = 0; -- years don't match
else
result = 2; -- years match; but because disambiguated, don't add to maint cat
end
elseif date_string:match ("%d%d%d%d?.-%d%d%d%d?") then -- any of the standard range formats of date with two three- or four-digit years
date1, date2 = date_string:match ("(%d%d%d%d?).-(%d%d%d%d?)");
if year ~= date1 and year ~= date2 then
result = 0;
end
elseif mw.ustring.match(date_string, "%d%d%d%d[%-–]%d%d") then -- YYYY-YY date ranges
local century;
date1, century, date2 = mw.ustring.match(date_string, "((%d%d)%d%d)[%-–]+(%d%d)");
date2 = century..date2; -- convert YY to YYYY
if year ~= date1 and year ~= date2 then
result = 0;
end
elseif date_string:match ("%d%d%d%d?") then -- any of the standard formats of date with one year
date1 = date_string:match ("(%d%d%d%d?)");
if year ~= date1 then
result = 0;
end
else
result = 0; -- no recognizable year in date
end
return result;
end
--[[--------------------------< R E F O R M A T T E R >--------------------------------------------------------
reformat 'date' into new format specified by format_param if pattern_idx (the current format of 'date') can be
reformatted. Does the grunt work for reformat_dates().
The table re_formats maps patern_idx (current format) and format_param (desired format) to a table that holds:
format string used by string.format()
identifier letters ('d', 'm', 'y', 'd2', 'm2', 'y2') that serve as indexes into a table t{} that holds captures
from mw.ustring.match() for the various date parts specified by patterns[pattern_idx][1]
Items in patterns{} have the general form:
['ymd'] = {'^(%d%d%d%d)%-(%d%d)%-(%d%d)$', 'y', 'm', 'd'}, where:
['ymd'] is pattern_idx
patterns['ymd'][1] is the match pattern with captures for mw.ustring.match()
patterns['ymd'][2] is an indicator letter identifying the content of the first capture
patterns['ymd'][3] ... the second capture etc
when a pattern matches a date, the captures are loaded into table t{} in capture order using the idemtifier
characters as indexes into t{} For the above, a ymd date is in t{} as:
t.y = first capture (year), t.m = second capture (month), t.d = third capture (day)
To reformat, this function is called with the pattern_idx that matches the current format of the date and with
format_param set to the desired format. This function loads table t{} as described and then calls string.format()
with the format string specified by re_format[pattern_idx][format_param][1] using values taken from t{} according
to the capture identifier letters specified by patterns[pattern_idx][format_param][n] where n is 2..
]]
local re_formats = {
['ymd'] = { -- date format is ymd; reformat to:
['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy
['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy
-- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki
},
['Mdy'] = { -- date format is Mdy; reformat to:
['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- for long/short reformatting
['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy
['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd
-- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki
},
['dMy'] = { -- date format is dMy; reformat to:
['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- for long/short reformatting
['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy
['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd
-- ['yMd'] = {'%s %s %s', 'y', 'm', 'd'}, -- |df=yMd; not supported at en.wiki
},
['Md-dy'] = { -- date format is Md-dy; reformat to:
['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- for long/short reformatting
['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- |df=dmy -> d-dMy
},
['d-dMy'] = { -- date format is d-d>y; reformat to:
['dmy'] = {'%s–%s %s %s', 'd', 'd2', 'm', 'y'}, -- for long/short reformatting
['mdy'] = {'%s %s–%s, %s', 'm', 'd', 'd2', 'y'}, -- |df=mdy -> Md-dy
},
['dM-dMy'] = { -- date format is dM-dMy; reformat to:
['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- for long/short reformatting
['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- |df=mdy -> Md-Mdy
},
['Md-Mdy'] = { -- date format is Md-Mdy; reformat to:
['mdy'] = {'%s %s – %s %s, %s', 'm', 'd', 'm2', 'd2', 'y'}, -- for long/short reformatting
['dmy'] = {'%s %s – %s %s %s', 'd', 'm', 'd2', 'm2', 'y'}, -- |df=dmy -> dM-dMy
},
['dMy-dMy'] = { -- date format is dMy-dMy; reformat to:
['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- for long/short reformatting
['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- |df=mdy -> Mdy-Mdy
},
['Mdy-Mdy'] = { -- date format is Mdy-Mdy; reformat to:
['mdy'] = {'%s %s, %s – %s %s, %s', 'm', 'd', 'y', 'm2', 'd2', 'y2'}, -- for long/short reformatting
['dmy'] = {'%s %s %s – %s %s %s', 'd', 'm', 'y', 'd2', 'm2', 'y2'}, -- |df=dmy -> dMy-dMy
},
['My-My'] = { -- these for long/short reformatting
['any'] = {'%s %s – %s %s', 'm', 'y', 'm2', 'y2'}, -- dmy/mdy agnostic
},
['M-My'] = { -- these for long/short reformatting
['any'] = {'%s–%s %s', 'm', 'm2', 'y'}, -- dmy/mdy agnostic
},
['My'] = { -- these for long/short reformatting
['any'] = {'%s %s', 'm', 'y'}, -- dmy/mdy agnostic
},
-- ['yMd'] = { -- not supported at en.wiki
-- ['mdy'] = {'%s %s, %s', 'm', 'd', 'y'}, -- |df=mdy
-- ['dmy'] = {'%s %s %s', 'd', 'm', 'y'}, -- |df=dmy
-- ['ymd'] = {'%s-%s-%s', 'y', 'm', 'd'}, -- |df=ymd
-- },
}
local function reformatter (date, pattern_idx, format_param, mon_len)
if not in_array (pattern_idx, {'ymd', 'Mdy', 'Md-dy', 'dMy', 'yMd', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then
return; -- not in this set of date format patterns then not a reformattable date
end
if 'ymd' == format_param and in_array (pattern_idx, {'ymd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy', 'My-My', 'M-My', 'My'}) then
return; -- ymd date ranges not supported at en.wiki; no point in reformatting ymd to ymd
end
if in_array (pattern_idx, {'My', 'M-My', 'My-My'}) then -- these are not dmy/mdy so can't be 'reformatted' into either
format_param = 'any'; -- so format-agnostic
end
-- if 'yMd' == format_param and in_array (pattern_idx, {'yMd', 'Md-dy', 'd-dMy', 'dM-dMy', 'Md-Mdy', 'dMy-dMy', 'Mdy-Mdy'}) then -- not supported at en.wiki
if 'yMd' == format_param then -- not supported at en.wiki
return; -- not a reformattable date
end
local c1, c2, c3, c4, c5, c6, c7; -- these hold the captures specified in patterns[pattern_idx][1]
c1, c2, c3, c4, c5, c6, c7 = mw.ustring.match (date, patterns[pattern_idx][1]); -- get the captures
local t = { -- table that holds k/v pairs of date parts from the captures and patterns[pattern_idx][2..]
[patterns[pattern_idx][2]] = c1; -- at minimum there is always one capture with a matching indicator letter
[patterns[pattern_idx][3] or 'x'] = c2; -- patterns can have a variable number of captures; each capture requires an indicator letter;
[patterns[pattern_idx][4] or 'x'] = c3; -- where there is no capture, there is no indicator letter so n in patterns[pattern_idx][n] will be nil;
[patterns[pattern_idx][5] or 'x'] = c4; -- the 'x' here spoofs an indicator letter to prevent 'table index is nil' error
[patterns[pattern_idx][6] or 'x'] = c5;
[patterns[pattern_idx][7] or 'x'] = c6;
[patterns[pattern_idx][8] or 'x'] = c7;
};
if tonumber(t.m) then -- if raw month is a number (converting from ymd)
if 's' == mon_len then -- if we are to use abbreviated month names
t.m = cfg.date_names['inv_local_s'][tonumber(t.m)]; -- convert it to a month name
else
t.m = cfg.date_names['inv_local_l'][tonumber(t.m)]; -- convert it to a month name
end
t.d = t.d:gsub ('0(%d)', '%1'); -- strip leading '0' from day if present
elseif 'ymd' == format_param then -- when converting to ymd
if 1582 > tonumber(t.y) then -- ymd format dates not allowed before 1582
return;
end
t.m = string.format ('%02d', get_month_number (t.m)); -- make sure that month and day are two digits
t.d = string.format ('%02d', t.d);
elseif mon_len then -- if mon_len is set to either 'short' or 'long'
for _, mon in ipairs ({'m', 'm2'}) do -- because there can be two month names, check both
if t[mon] then
t[mon] = get_month_number (t[mon]); -- get the month number for this month (is length agnostic)
if 0 == t[mon] then return; end -- seasons and named dates can't be converted
t[mon] = (('s' == mon_len) and cfg.date_names['inv_local_s'][t[mon]]) or cfg.date_names['inv_local_l'][t[mon]]; -- fetch month name according to length
end
end
end
local new_date = string.format (re_formats[pattern_idx][format_param][1], -- format string
t[re_formats[pattern_idx][format_param][2]], -- named captures from t{}
t[re_formats[pattern_idx][format_param][3]],
t[re_formats[pattern_idx][format_param][4]],
t[re_formats[pattern_idx][format_param][5]],
t[re_formats[pattern_idx][format_param][6]],
t[re_formats[pattern_idx][format_param][7]],
t[re_formats[pattern_idx][format_param][8]]
);
return new_date;
end
--[[-------------------------< R E F O R M A T _ D A T E S >--------------------------------------------------
Reformats existing dates into the format specified by format.
format is one of several manual keywords: dmy, dmy-all, mdy, mdy-all, ymd, ymd-all. The -all version includes
access- and archive-dates; otherwise these dates are not reformatted.
This function allows automatic date formatting. In ~/Configuration, the article source is searched for one of
the {{use xxx dates}} templates. If found, xxx becomes the global date format as xxx-all. If |cs1-dates= in
{{use xxx dates}} has legitimate value then that value determines how cs1|2 dates will be rendered. Legitimate
values for |cs1-dates= are:
l - all dates are rendered with long month names
ls - publication dates use long month names; access-/archive-dates use abbreviated month names
ly - publication dates use long month names; access-/archive-dates rendered in ymd format
s - all dates are rendered with abbreviated (short) month names
sy - publication dates use abbreviated month names; access-/archive-dates rendered in ymd format
y - all dates are rendered in ymd format
the format argument for automatic date formatting will be the format specified by {{use xxx dates}} with the
value supplied by |cs1-dates so one of: xxx-l, xxx-ls, xxx-ly, xxx-s, xxx-sy, xxx-y, or simply xxx (|cs1-dates=
empty, omitted, or invalid) where xxx shall be either of dmy or mdy.
dates are extracted from date_parameters_list, reformatted (if appropriate), and then written back into the
list in the new format. Dates in date_parameters_list are presumed here to be valid (no errors). This function
returns true when a date has been reformatted, false else. Actual reformatting is done by reformatter().
]]
local function reformat_dates (date_parameters_list, format)
local all = false; -- set to false to skip access- and archive-dates
local len_p = 'l'; -- default publication date length shall be long
local len_a = 'l'; -- default access-/archive-date length shall be long
local result = false;
local new_date;
if format:match('%a+%-all') then -- manual df keyword; auto df keyword when length not specified in {{use xxx dates}};
format = format:match('(%a+)%-all'); -- extract the format
all = true; -- all dates are long format dates because this keyword doesn't specify length
elseif format:match('%a+%-[lsy][sy]?') then -- auto df keywords; internal only
all = true; -- auto df applies to all dates; use length specified by capture len_p for all dates
format, len_p, len_a = format:match('(%a+)%-([lsy])([sy]?)'); -- extract the format and length keywords
if 'y' == len_p then -- because allowed by MOS:DATEUNIFY (sort of) range dates and My dates not reformatted
format = 'ymd'; -- override {{use xxx dates}}
elseif (not is_set(len_a)) or (len_p == len_a) then -- no access-/archive-date length specified or same length as publication dates then
len_a = len_p; -- in case len_a not set
end
end -- else only publication dates and they are long
for param_name, param_val in pairs (date_parameters_list) do -- for each date-holding parameter in the list
if is_set (param_val.val) then -- if the parameter has a value
if not (not all and in_array (param_name, {'access-date', 'archive-date'})) then -- skip access- or archive-date unless format is xxx-all; yeah, ugly; TODO: find a better way
for pattern_idx, pattern in pairs (patterns) do
if mw.ustring.match (param_val.val, pattern[1]) then
if all and in_array (param_name, {'access-date', 'archive-date'}) then -- if this date is an access- or archive-date
new_date = reformatter (param_val.val, pattern_idx, (('y' == len_a) and 'ymd') or format, len_a); -- choose ymd or dmy/mdy according to len_a setting
else -- all other dates
new_date = reformatter (param_val.val, pattern_idx, format, len_p);
end
if new_date then -- set when date was reformatted
date_parameters_list[param_name].val = new_date; -- update date in date list
result = true; -- and announce that changes have been made
end
end -- if
end -- for
end -- if
end -- if
end -- for
return result; -- declare boolean result and done
end
--[[--------------------------< D A T E _ H Y P H E N _ T O _ D A S H >----------------------------------------
Loops through the list of date-holding parameters and converts any hyphen to an ndash. Not called if the cs1|2
template has any date errors.
Modifies the date_parameters_list and returns true if hyphens are replaced, else returns false.
]]
local function date_hyphen_to_dash (date_parameters_list)
local result = false;
local n;
for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list
if is_set (param_val.val) then
if not mw.ustring.match (param_val.val, '%d%d%d%d%-%d%d%-%d%d') then -- for those that are not ymd dates (ustring because here digits may not be western)
param_val.val, n = param_val.val:gsub ('%-', '–'); -- replace any hyphen with ndash
if 0 ~= n then
date_parameters_list[param_name].val = param_val.val; -- update the list
result = true;
end
end
end
end
return result; -- so we know if any hyphens were replaced
end
--[[-------------------------< D A T E _ N A M E _ X L A T E >------------------------------------------------
Attempts to translate English month names to local-language month names using names supplied by MediaWiki's
date parser function. This is simple name-for-name replacement and may not work for all languages.
if xlat_dig is true, this function will also translate western (English) digits to the local language's digits.
This will also translate ymd dates.
]]
local function date_name_xlate (date_parameters_list, xlt_dig)
local xlate;
local mode; -- long or short month names
local modified = false;
local date;
for param_name, param_val in pairs(date_parameters_list) do -- for each date-holding parameter in the list
if is_set(param_val.val) then -- if the parameter has a value
date = param_val.val;
for month in mw.ustring.gmatch (date, '%a+') do -- iterate through all dates in the date (single date or date range)
if cfg.date_names.en.long[month] then
mode = 'F'; -- English name is long so use long local name
elseif cfg.date_names.en.short[month] then
mode = 'M'; -- English name is short so use short local name
else
mode = nil; -- not an English month name; could be local language month name or an English season name
end
if mode then -- might be a season
xlate = lang_object:formatDate(mode, '1' .. month); -- translate the month name to this local language
date = mw.ustring.gsub (date, month, xlate); -- replace the English with the translation
date_parameters_list[param_name].val = date; -- save the translated date
modified = true;
end
end
if xlt_dig then -- shall we also translate digits?
date = date:gsub ('%d', cfg.date_names.xlate_digits); -- translate digits from western to 'local digits'
date_parameters_list[param_name].val = date; -- save the translated date
modified = true;
end
end
end
return modified;
end
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
Sets local imported functions table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr, utilities_page_ptr)
is_set = utilities_page_ptr.is_set; -- import functions from selected Module:Citation/CS1/Utilities module
in_array = utilities_page_ptr.in_array; -- import functions from selected Module:Citation/CS1/Utilities module
cfg = cfg_table_ptr; -- import tables from selected Module:Citation/CS1/Configuration
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return { -- return exported functions
dates = dates,
year_date_check = year_date_check,
reformat_dates = reformat_dates,
date_hyphen_to_dash = date_hyphen_to_dash,
date_name_xlate = date_name_xlate,
set_selected_modules = set_selected_modules
}
ceb2a1f045831c93875c98c30b6c73da97d557c9
Модуль:Citation/CS1/Identifiers
828
14
17
2022-07-19T12:35:55Z
CyberTailor
2
import module
Scribunto
text/plain
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local is_set, in_array, set_error, select_one, add_maint_cat, substitute, make_wikilink; -- functions in Module:Citation/CS1/Utilities
local z; -- table of tables defined in Module:Citation/CS1/Utilities
local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration
--============================<< H E L P E R F U N C T I O N S >>============================================
--[[--------------------------< E X T E R N A L _ L I N K _ I D >----------------------------------------------
Formats a wiki style external link
]]
local function external_link_id(options)
local url_string = options.id;
local ext_link;
local this_wiki_code = cfg.this_wiki_code; -- wikipedia subdomain; 'en' for en.wikipedia.org
local wd_article; -- article title from wikidata
if options.encode == true or options.encode == nil then
url_string = mw.uri.encode( url_string );
end
ext_link = mw.ustring.format ('[%s%s%s %s]', options.prefix, url_string, options.suffix or "", mw.text.nowiki(options.id));
if is_set(options.access) then
ext_link = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[options.access].class, cfg.presentation[options.access].title, ext_link}); -- add the free-to-read / paywall lock
end
-- this_wiki_code = mw.language.getContentLanguage():getCode(); -- get this wikipedia's language code (subdomain)
if string.match (mw.site.server, 'wikidata') then
this_wiki_code = mw.getCurrentFrame():preprocess('{{int:lang}}'); -- on wikidata so use interface language setting instead
end
if is_set (options.q) and mw.wikibase then -- wikibase test here avoids script errors in third party wikis that aren't using mw.wikibase extension
wd_article = mw.wikibase.getEntity (options.q):getSitelink (this_wiki_code .. 'wiki'); -- fetch article title from wd
if wd_article then
wd_article = table.concat ({':', this_wiki_code, ':', wd_article}); -- make interwiki link if taken from wd; leading colon required
end
end
return table.concat ({
make_wikilink (wd_article or options.link, options.label), -- wikidata link or locally specified
options.separator or ' ',
ext_link
});
end
--[[--------------------------< I N T E R N A L _ L I N K _ I D >----------------------------------------------
Formats a wiki style internal link
]]
local function internal_link_id(options)
local id = mw.ustring.gsub (options.id, '%d', cfg.date_names.local_digits); -- translate 'local' digits to Western 0-9
return table.concat (
{
make_wikilink (options.link, options.label),
options.separator or ' ',
make_wikilink (
table.concat (
{
options.prefix,
id, -- translated to western digits
options.suffix or ''
}),
substitute (cfg.presentation['bdi'], {'', mw.text.nowiki (options.id)}) -- bdi tags to prevent Latn script identifiers from being reversed at rtl language wikis
); -- nowiki because MediaWiki still has magic links for ISBN and the like; TODO: is it really required?
});
end
--[[--------------------------< I S _ E M B A R G O E D >------------------------------------------------------
Determines if a PMC identifier's online version is embargoed. Compares the date in |embargo= against today's date. If embargo date is
in the future, returns the content of |embargo=; otherwise, returns and empty string because the embargo has expired or because
|embargo= was not set in this cite.
]]
local function is_embargoed (embargo)
if is_set (embargo) then
local lang = mw.getContentLanguage();
local good1, embargo_date, good2, todays_date;
good1, embargo_date = pcall( lang.formatDate, lang, 'U', embargo );
good2, todays_date = pcall( lang.formatDate, lang, 'U' );
if good1 and good2 then -- if embargo date and today's date are good dates
if tonumber( embargo_date ) >= tonumber( todays_date ) then -- is embargo date is in the future?
return embargo; -- still embargoed
else
add_maint_cat ('embargo')
return ''; -- unset because embargo has expired
end
end
end
return ''; -- |embargo= not set return empty string
end
--[[--------------------------< IS _ V A L I D _ I S X N >-----------------------------------------------------
ISBN-10 and ISSN validator code calculates checksum across all isbn/issn digits including the check digit.
ISBN-13 is checked in isbn().
If the number is valid the result will be 0. Before calling this function, issbn/issn must be checked for length
and stripped of dashes, spaces and other non-isxn characters.
]]
local function is_valid_isxn (isxn_str, len)
local temp = 0;
isxn_str = { isxn_str:byte(1, len) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39, 'X' → 0x58
len = len+1; -- adjust to be a loop counter
for i, v in ipairs( isxn_str ) do -- loop through all of the bytes and calculate the checksum
if v == string.byte( "X" ) then -- if checkdigit is X (compares the byte value of 'X' which is 0x58)
temp = temp + 10*( len - i ); -- it represents 10 decimal
else
temp = temp + tonumber( string.char(v) )*(len-i);
end
end
return temp % 11 == 0; -- returns true if calculation result is zero
end
--[[--------------------------< IS _ V A L I D _ I S X N _ 1 3 >-----------------------------------------------
ISBN-13 and ISMN validator code calculates checksum across all 13 isbn/ismn digits including the check digit.
If the number is valid, the result will be 0. Before calling this function, isbn-13/ismn must be checked for length
and stripped of dashes, spaces and other non-isxn-13 characters.
]]
local function is_valid_isxn_13 (isxn_str)
local temp=0;
isxn_str = { isxn_str:byte(1, 13) }; -- make a table of byte values '0' → 0x30 .. '9' → 0x39
for i, v in ipairs( isxn_str ) do
temp = temp + (3 - 2*(i % 2)) * tonumber( string.char(v) ); -- multiply odd index digits by 1, even index digits by 3 and sum; includes check digit
end
return temp % 10 == 0; -- sum modulo 10 is zero when isbn-13/ismn is correct
end
--[[--------------------------< N O R M A L I Z E _ L C C N >--------------------------------------------------
lccn normalization (http://www.loc.gov/marc/lccn-namespace.html#normalization)
1. Remove all blanks.
2. If there is a forward slash (/) in the string, remove it, and remove all characters to the right of the forward slash.
3. If there is a hyphen in the string:
a. Remove it.
b. Inspect the substring following (to the right of) the (removed) hyphen. Then (and assuming that steps 1 and 2 have been carried out):
1. All these characters should be digits, and there should be six or less. (not done in this function)
2. If the length of the substring is less than 6, left-fill the substring with zeroes until the length is six.
Returns a normalized lccn for lccn() to validate. There is no error checking (step 3.b.1) performed in this function.
]]
local function normalize_lccn (lccn)
lccn = lccn:gsub ("%s", ""); -- 1. strip whitespace
if nil ~= string.find (lccn,'/') then
lccn = lccn:match ("(.-)/"); -- 2. remove forward slash and all character to the right of it
end
local prefix
local suffix
prefix, suffix = lccn:match ("(.+)%-(.+)"); -- 3.a remove hyphen by splitting the string into prefix and suffix
if nil ~= suffix then -- if there was a hyphen
suffix=string.rep("0", 6-string.len (suffix)) .. suffix; -- 3.b.2 left fill the suffix with 0s if suffix length less than 6
lccn=prefix..suffix; -- reassemble the lccn
end
return lccn;
end
--============================<< I D E N T I F I E R F U N C T I O N S >>====================================
--[[--------------------------< A R X I V >--------------------------------------------------------------------
See: http://arxiv.org/help/arxiv_identifier
format and error check arXiv identifier. There are three valid forms of the identifier:
the first form, valid only between date codes 9108 and 0703 is:
arXiv:<archive>.<class>/<date code><number><version>
where:
<archive> is a string of alpha characters - may be hyphenated; no other punctuation
<class> is a string of alpha characters - may be hyphenated; no other punctuation; not the same as |class= parameter which is not supported in this form
<date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01
first digit of YY for this form can only 9 and 0
<number> is a three-digit number
<version> is a 1 or more digit number preceded with a lowercase v; no spaces (undocumented)
the second form, valid from April 2007 through December 2014 is:
arXiv:<date code>.<number><version>
where:
<date code> is four digits in the form YYMM where YY is the last two digits of the four-digit year and MM is the month number January = 01
<number> is a four-digit number
<version> is a 1 or more digit number preceded with a lowercase v; no spaces
the third form, valid from January 2015 is:
arXiv:<date code>.<number><version>
where:
<date code> and <version> are as defined for 0704-1412
<number> is a five-digit number
]]
local function arxiv (id, class)
local handler = cfg.id_handlers['ARXIV'];
local year, month, version;
local err_cat = false; -- assume no error message
local text; -- output text
if id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%d$") or id:match("^%a[%a%.%-]+/[90]%d[01]%d%d%d%dv%d+$") then -- test for the 9108-0703 format w/ & w/o version
year, month = id:match("^%a[%a%.%-]+/([90]%d)([01]%d)%d%d%d[v%d]*$");
year = tonumber(year);
month = tonumber(month);
if ((not (90 < year or 8 > year)) or (1 > month or 12 < month)) or -- if invalid year or invalid month
((91 == year and 7 > month) or (7 == year and 3 < month)) then -- if years ok, are starting and ending months ok?
err_cat = true; -- flag for error message
end
elseif id:match("^%d%d[01]%d%.%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%dv%d+$") then -- test for the 0704-1412 w/ & w/o version
year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d[v%d]*$");
year = tonumber(year);
month = tonumber(month);
if ((7 > year) or (14 < year) or (1 > month or 12 < month)) or -- is year invalid or is month invalid? (doesn't test for future years)
((7 == year) and (4 > month)) then --or -- when year is 07, is month invalid (before April)?
err_cat = true; -- flag for error message
end
elseif id:match("^%d%d[01]%d%.%d%d%d%d%d$") or id:match("^%d%d[01]%d%.%d%d%d%d%dv%d+$") then -- test for the 1501- format w/ & w/o version
year, month = id:match("^(%d%d)([01]%d)%.%d%d%d%d%d[v%d]*$");
year = tonumber(year);
month = tonumber(month);
if ((15 > year) or (1 > month or 12 < month)) then -- is year invalid or is month invalid? (doesn't test for future years)
err_cat = true; -- flag for error message
end
else
err_cat = true; -- not a recognized format; flag for error message
end
err_cat = err_cat and table.concat ({' ', set_error ('bad_arxiv')}) or ''; -- set error message if flag is true
text = external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat;
if is_set (class) then
if id:match ('^%d+') then
text = table.concat ({text, ' [[//arxiv.org/archive/', class, ' ', class, ']]'}); -- external link within square brackets, not wikilink
else
text = table.concat ({text, ' ', set_error ('class_ignored')});
end
end
return text;
end
--[[--------------------------< B I B C O D E >--------------------------------------------------------------------
Validates (sort of) and formats a bibcode id.
Format for bibcodes is specified here: http://adsabs.harvard.edu/abs_doc/help_pages/data.html#bibcodes
But, this: 2015arXiv151206696F is apparently valid so apparently, the only things that really matter are length, 19 characters
and first four digits must be a year. This function makes these tests:
length must be 19 characters
characters in position
1–4 must be digits and must represent a year in the range of 1000 – next year
5 must be a letter
6–8 must be letter, digit, ampersand, or dot (ampersand cannot directly precede a dot; &. )
9–18 must be letter, digit, or dot
19 must be a letter or dot
]]
local function bibcode (id, access)
local handler = cfg.id_handlers['BIBCODE'];
local err_type;
local year;
local text = external_link_id({link=handler.link, label=handler.label, q = handler.q,
prefix=handler.prefix, id=id, separator=handler.separator, encode=handler.encode,
access=access});
if 19 ~= id:len() then
err_type = 'length';
else
year = id:match ("^(%d%d%d%d)[%a][%w&%.][%w&%.][%w&%.][%w.]+[%a%.]$") --
if not year then -- if nil then no pattern match
err_type = 'value'; -- so value error
else
local next_year = tonumber(os.date ('%Y'))+1; -- get the current year as a number and add one for next year
year = tonumber (year); -- convert year portion of bibcode to a number
if (1000 > year) or (year > next_year) then
err_type = 'year'; -- year out of bounds
end
if id:find('&%.') then
err_type = 'journal'; -- journal abbreviation must not have '&.' (if it does its missing a letter)
end
end
end
if is_set (err_type) then -- if there was an error detected
text = text .. ' ' .. set_error( 'bad_bibcode', {err_type});
end
return text;
end
--[[--------------------------< B I O R X I V >-----------------------------------------------------------------
Format bioRxiv id and do simple error checking. BiorXiv ids are exactly 6 digits.
The bioRxiv id is the number following the last slash in the bioRxiv-issued DOI:
https://doi.org/10.1101/078733 -> 078733
]]
local function biorxiv(id)
local handler = cfg.id_handlers['BIORXIV'];
local err_cat = ''; -- presume that bioRxiv id is valid
if nil == id:match("^%d%d%d%d%d%d$") then -- if bioRxiv id has anything but six digits
err_cat = ' ' .. set_error( 'bad_biorxiv'); -- set an error message
end
return external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator,
encode=handler.encode, access=handler.access}) .. err_cat;
end
--[[--------------------------< C I T E S E E R X >------------------------------------------------------------
CiteSeerX use their own notion of "doi" (not to be confused with the identifiers resolved via doi.org).
The description of the structure of this identifier can be found at Help_talk:Citation_Style_1/Archive_26#CiteSeerX_id_structure
]]
local function citeseerx (id)
local handler = cfg.id_handlers['CITESEERX'];
local matched;
local text = external_link_id({link=handler.link, label=handler.label, q = handler.q,
prefix=handler.prefix, id=id, separator=handler.separator, encode=handler.encode,
access=handler.access});
matched = id:match ("^10%.1%.1%.[1-9]%d?%d?%d?%.[1-9]%d?%d?%d?$");
if not matched then
text = text .. ' ' .. set_error( 'bad_citeseerx' );
end
return text;
end
--[[--------------------------< D O I >------------------------------------------------------------------------
Formats a DOI and checks for DOI errors.
DOI names contain two parts: prefix and suffix separated by a forward slash.
Prefix: directory indicator '10.' followed by a registrant code
Suffix: character string of any length chosen by the registrant
This function checks a DOI name for: prefix/suffix. If the doi name contains spaces or endashes, or, if it ends
with a period or a comma, this function will emit a bad_doi error message.
DOI names are case-insensitive and can incorporate any printable Unicode characters so the test for spaces, endash,
and terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely
if ever used in doi names.
]]
local function doi(id, inactive, access)
local cat = ""
local handler = cfg.id_handlers['DOI'];
local text;
if is_set(inactive) then
local inactive_year = inactive:match("%d%d%d%d") or ''; -- try to get the year portion from the inactive date
local inactive_month, good;
if is_set (inactive_year) then
if 4 < inactive:len() then -- inactive date has more than just a year (could be anything)
local lang_obj = mw.getContentLanguage(); -- get a language object for this wiki
good, inactive_month = pcall (lang_obj.formatDate, lang_obj, 'F', inactive); -- try to get the month name from the inactive date
if not good then
inactive_month = nil; -- something went wrong so make sure this is unset
end
end
else
inactive_year = nil; -- |doi-broken= has something but it isn't a date
end
if is_set(inactive_year) and is_set (inactive_month) then
table.insert( z.error_categories, 'Pages with DOIs inactive as of ' .. inactive_year .. ' ' .. inactive_month); -- use inactive month in category name
elseif is_set(inactive_year) then
table.insert( z.error_categories, 'Pages with DOIs inactive as of ' .. inactive_year);
else
table.insert( z.error_categories, 'Pages with inactive DOIs'); -- when inactive doesn't contain a recognizable date
end
inactive = " (" .. cfg.messages['inactive'] .. ' ' .. inactive .. ')';
end
text = external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=access}) .. (inactive or '')
local registrant = id:match ('^10%.([^/]+)/[^%s–]-[^%.,]$'); -- registrant set when doi has the proper basic form
registrant_err_patterns = { -- these patterns are for code ranges that are not supported
'^[^1-3]%d%d%d%d%.%d%d*$', -- 5 digits with subcode (0xxxx, 40000+); accecpts: 10000–39999
'^[^1-3]%d%d%d%d$', -- 5 digits without subcode (0xxxx, 40000+); accecpts: 10000–39999
'^[^1-9]%d%d%d%.%d%d*$', -- 4 digits with subcode (0xxx); accecpts: 1000–9999
'^[^1-9]%d%d%d$', -- 4 digits without subcode (0xxx); accecpts: 1000–9999
'^%d%d%d%d%d%d+', -- 6 or more digits
'^%d%d?%d?$', -- less than 4 digits without subcode (with subcode is legitimate)
'^5555$', -- test registrant will never resolve
}
if registrant then -- when doi has proper form
for i, pattern in ipairs (registrant_err_patterns) do -- spin through error patterns
if registrant:match (pattern) then -- to validate registrant codes
cat = ' ' .. set_error ('bad_doi'); -- when found, mark this doi as bad
break; -- and done
end
end
else
cat = ' ' .. set_error ('bad_doi'); -- invalid directory or malformed
end
return text .. cat
end
--[[--------------------------< H D L >------------------------------------------------------------------------
Formats an HDL with minor error checking.
HDL names contain two parts: prefix and suffix separated by a forward slash.
Prefix: character string using any character in the UCS-2 character set except '/'
Suffix: character string of any length using any character in the UCS-2 character set chosen by the registrant
This function checks a HDL name for: prefix/suffix. If the HDL name contains spaces, endashes, or, if it ends
with a period or a comma, this function will emit a bad_hdl error message.
HDL names are case-insensitive and can incorporate any printable Unicode characters so the test for endashes and
terminal punctuation may not be technically correct but it appears, that in practice these characters are rarely
if ever used in HDLs.
]]
local function hdl(id, access)
local handler = cfg.id_handlers['HDL'];
local text = external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=access})
if nil == id:match("^[^%s–]-/[^%s–]-[^%.,]$") then -- hdl must contain a fwd slash, must not contain spaces, endashes, and must not end with period or comma
text = text .. ' ' .. set_error( 'bad_hdl' );
end
return text;
end
--[[--------------------------< I S B N >----------------------------------------------------------------------
Determines whether an ISBN string is valid
]]
local function isbn( isbn_str )
if nil ~= isbn_str:match("[^%s-0-9X]") then
return false, 'invalid character'; -- fail if isbn_str contains anything but digits, hyphens, or the uppercase X
end
isbn_str = isbn_str:gsub( "-", "" ):gsub( " ", "" ); -- remove hyphens and spaces
local len = isbn_str:len();
if len ~= 10 and len ~= 13 then
return false, 'length'; -- fail if incorrect length
end
if len == 10 then
if isbn_str:match( "^%d*X?$" ) == nil then -- fail if isbn_str has 'X' anywhere but last position
return false, 'invalid form';
end
return is_valid_isxn(isbn_str, 10), 'checksum';
else
if isbn_str:match( "^%d+$" ) == nil then
return false, 'invalid character'; -- fail if isbn13 is not all digits
end
if isbn_str:match( "^97[89]%d*$" ) == nil then
return false, 'invalid prefix'; -- fail when isbn13 does not begin with 978 or 979
end
if isbn_str:match ('^9790') then
return false, 'invalid group id'; -- group identifier '0' is reserved to ismn
end
return is_valid_isxn_13 (isbn_str), 'checksum';
end
end
--[[--------------------------< A M A Z O N >------------------------------------------------------------------
Formats a link to Amazon. Do simple error checking: asin must be mix of 10 numeric or uppercase alpha
characters. If a mix, first character must be uppercase alpha; if all numeric, asins must be 10-digit
isbn. If 10-digit isbn, add a maintenance category so a bot or awb script can replace |asin= with |isbn=.
Error message if not 10 characters, if not isbn10, if mixed and first character is a digit.
This function is positioned here because it calls isbn()
]]
local function asin(id, domain)
local err_cat = ""
if not id:match("^[%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u][%d%u]$") then
err_cat = ' ' .. set_error ('bad_asin'); -- asin is not a mix of 10 uppercase alpha and numeric characters
else
if id:match("^%d%d%d%d%d%d%d%d%d[%dX]$") then -- if 10-digit numeric (or 9 digits with terminal X)
if isbn( id ) then -- see if asin value is isbn10
add_maint_cat ('ASIN');
elseif not is_set (err_cat) then
err_cat = ' ' .. set_error ('bad_asin'); -- asin is not isbn10
end
elseif not id:match("^%u[%d%u]+$") then
err_cat = ' ' .. set_error ('bad_asin'); -- asin doesn't begin with uppercase alpha
end
end
if not is_set(domain) then
domain = "com";
elseif in_array (domain, {'jp', 'uk'}) then -- Japan, United Kingdom
domain = "co." .. domain;
elseif in_array (domain, {'au', 'br', 'mx'}) then -- Australia, Brazil, Mexico
domain = "com." .. domain;
end
local handler = cfg.id_handlers['ASIN'];
return external_link_id({link=handler.link,
label=handler.label, q = handler.q, prefix=handler.prefix .. domain .. "/dp/",
id=id, encode=handler.encode, separator = handler.separator}) .. err_cat;
end
--[[--------------------------< I S M N >----------------------------------------------------------------------
Determines whether an ISMN string is valid. Similar to isbn-13, ismn is 13 digits begining 979-0-... and uses the
same check digit calculations. See http://www.ismn-international.org/download/Web_ISMN_Users_Manual_2008-6.pdf
section 2, pages 9–12.
]]
local function ismn (id)
local handler = cfg.id_handlers['ISMN'];
local text;
local valid_ismn = true;
local id_copy;
id_copy = id; -- save a copy because this testing is destructive
id=id:gsub( "[%s-–]", "" ); -- strip spaces, hyphens, and endashes from the ismn
if 13 ~= id:len() or id:match( "^9790%d*$" ) == nil then -- ismn must be 13 digits and begin 9790
valid_ismn = false;
else
valid_ismn=is_valid_isxn_13 (id); -- validate ismn
end
-- text = internal_link_id({link = handler.link, label = handler.label, -- use this (or external version) when there is some place to link to
-- prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode})
text = table.concat (
{
make_wikilink (handler.link, handler.label),
handler.separator,
id_copy
}); -- because no place to link to yet
if false == valid_ismn then
text = text .. ' ' .. set_error( 'bad_ismn' ) -- add an error message if the ismn is invalid
end
return text;
end
--[[--------------------------< I S S N >----------------------------------------------------------------------
Validate and format an issn. This code fixes the case where an editor has included an ISSN in the citation but
has separated the two groups of four digits with a space. When that condition occurred, the resulting link looked
like this:
|issn=0819 4327 gives: [http://www.worldcat.org/issn/0819 4327 0819 4327] -- can't have spaces in an external link
This code now prevents that by inserting a hyphen at the issn midpoint. It also validates the issn for length
and makes sure that the checkdigit agrees with the calculated value. Incorrect length (8 digits), characters
other than 0-9 and X, or checkdigit / calculated value mismatch will all cause a check issn error message. The
issn is always displayed with a hyphen, even if the issn was given as a single group of 8 digits.
]]
local function issn(id, e)
local issn_copy = id; -- save a copy of unadulterated issn; use this version for display if issn does not validate
local handler;
local text;
local valid_issn = true;
if e then
handler = cfg.id_handlers['EISSN'];
else
handler = cfg.id_handlers['ISSN'];
end
id=id:gsub( "[%s-–]", "" ); -- strip spaces, hyphens, and endashes from the issn
if 8 ~= id:len() or nil == id:match( "^%d*X?$" ) then -- validate the issn: 8 digits long, containing only 0-9 or X in the last position
valid_issn=false; -- wrong length or improper character
else
valid_issn=is_valid_isxn(id, 8); -- validate issn
end
if true == valid_issn then
id = string.sub( id, 1, 4 ) .. "-" .. string.sub( id, 5 ); -- if valid, display correctly formatted version
else
id = issn_copy; -- if not valid, use the show the invalid issn with error message
end
text = external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode})
if false == valid_issn then
text = text .. ' ' .. set_error( 'bad_issn', e and 'e' or '' ) -- add an error message if the issn is invalid
end
return text
end
--[[--------------------------< J F M >-----------------------------------------------------------------------
A numerical identifier in the form nn.nnnn.nn
]]
local function jfm (id)
local handler = cfg.id_handlers['JFM'];
local id_num;
local err_cat = '';
id_num = id:match ('^[Jj][Ff][Mm](.*)$'); -- identifier with jfm prefix; extract identifier
if is_set (id_num) then
add_maint_cat ('jfm_format');
else -- plain number without mr prefix
id_num = id; -- if here id does not have prefix
end
if id_num and id_num:match('^%d%d%.%d%d%d%d%.%d%d$') then
id = id_num; -- jfm matches pattern
else
err_cat = ' ' .. set_error( 'bad_jfm' ); -- set an error message
end
return external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat;
end
--[[--------------------------< L C C N >----------------------------------------------------------------------
Format LCCN link and do simple error checking. LCCN is a character string 8-12 characters long. The length of
the LCCN dictates the character type of the first 1-3 characters; the rightmost eight are always digits.
http://info-uri.info/registry/OAIHandler?verb=GetRecord&metadataPrefix=reg&identifier=info:lccn/
length = 8 then all digits
length = 9 then lccn[1] is lower case alpha
length = 10 then lccn[1] and lccn[2] are both lower case alpha or both digits
length = 11 then lccn[1] is lower case alpha, lccn[2] and lccn[3] are both lower case alpha or both digits
length = 12 then lccn[1] and lccn[2] are both lower case alpha
]]
local function lccn(lccn)
local handler = cfg.id_handlers['LCCN'];
local err_cat = ''; -- presume that LCCN is valid
local id = lccn; -- local copy of the lccn
id = normalize_lccn (id); -- get canonical form (no whitespace, hyphens, forward slashes)
local len = id:len(); -- get the length of the lccn
if 8 == len then
if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits)
err_cat = ' ' .. set_error( 'bad_lccn' ); -- set an error message
end
elseif 9 == len then -- LCCN should be adddddddd
if nil == id:match("%l%d%d%d%d%d%d%d%d") then -- does it match our pattern?
err_cat = ' ' .. set_error( 'bad_lccn' ); -- set an error message
end
elseif 10 == len then -- LCCN should be aadddddddd or dddddddddd
if id:match("[^%d]") then -- if LCCN has anything but digits (nil if only digits) ...
if nil == id:match("^%l%l%d%d%d%d%d%d%d%d") then -- ... see if it matches our pattern
err_cat = ' ' .. set_error( 'bad_lccn' ); -- no match, set an error message
end
end
elseif 11 == len then -- LCCN should be aaadddddddd or adddddddddd
if not (id:match("^%l%l%l%d%d%d%d%d%d%d%d") or id:match("^%l%d%d%d%d%d%d%d%d%d%d")) then -- see if it matches one of our patterns
err_cat = ' ' .. set_error( 'bad_lccn' ); -- no match, set an error message
end
elseif 12 == len then -- LCCN should be aadddddddddd
if not id:match("^%l%l%d%d%d%d%d%d%d%d%d%d") then -- see if it matches our pattern
err_cat = ' ' .. set_error( 'bad_lccn' ); -- no match, set an error message
end
else
err_cat = ' ' .. set_error( 'bad_lccn' ); -- wrong length, set an error message
end
if not is_set (err_cat) and nil ~= lccn:find ('%s') then
err_cat = ' ' .. set_error( 'bad_lccn' ); -- lccn contains a space, set an error message
end
return external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=lccn,separator=handler.separator, encode=handler.encode}) .. err_cat;
end
--[[--------------------------< M R >--------------------------------------------------------------------------
A seven digit number; if not seven digits, zero-fill leading digits to make seven digits.
]]
local function mr (id)
local handler = cfg.id_handlers['MR'];
local id_num;
local id_len;
local err_cat = '';
id_num = id:match ('^[Mm][Rr](%d+)$'); -- identifier with mr prefix
if is_set (id_num) then
add_maint_cat ('mr_format');
else -- plain number without mr prefix
id_num = id:match ('^%d+$'); -- if here id is all digits
end
id_len = id_num and id_num:len() or 0;
if (7 >= id_len) and (0 ~= id_len) then
id = string.rep ('0', 7-id_len ) .. id_num; -- zero-fill leading digits
else
err_cat = ' ' .. set_error( 'bad_mr' ); -- set an error message
end
return external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat;
end
--[[--------------------------< O C L C >----------------------------------------------------------------------
Validate and format an oclc id. https://www.oclc.org/batchload/controlnumber.en.html {{dead link}}
archived at: https://web.archive.org/web/20161228233804/https://www.oclc.org/batchload/controlnumber.en.html
]]
local function oclc (id)
local handler = cfg.id_handlers['OCLC'];
local number;
local err_msg = ''; -- empty string for concatenation
if id:match('^ocm%d%d%d%d%d%d%d%d$') then -- ocm prefix and 8 digits; 001 field (12 characters)
number = id:match('ocm(%d+)'); -- get the number
elseif id:match('^ocn%d%d%d%d%d%d%d%d%d$') then -- ocn prefix and 9 digits; 001 field (12 characters)
number = id:match('ocn(%d+)'); -- get the number
elseif id:match('^on%d%d%d%d%d%d%d%d%d%d+$') then -- on prefix and 10 or more digits; 001 field (12 characters)
number = id:match('^on(%d%d%d%d%d%d%d%d%d%d+)$'); -- get the number
elseif id:match('^%(OCoLC%)[1-9]%d*$') then -- (OCoLC) prefix and variable number digits; no leading zeros; 035 field
number = id:match('%(OCoLC%)([1-9]%d*)'); -- get the number
if 9 < number:len() then
number = nil; -- contrain to 1 to 9 digits; change this when oclc issues 10-digit numbers
end
elseif id:match('^%d+$') then -- no prefix
number = id; -- get the number
if 10 < number:len() then
number = nil; -- contrain to 1 to 10 digits; change this when oclc issues 11-digit numbers
end
end
if number then -- proper format
id = number; -- exclude prefix, if any, from external link
else
err_msg = ' ' .. set_error( 'bad_oclc' ) -- add an error message if the id is malformed
end
local text = external_link_id({link=handler.link, label=handler.label, q = handler.q,
prefix=handler.prefix, id=id, separator=handler.separator, encode=handler.encode}) .. err_msg;
return text;
end
--[[--------------------------< O P E N L I B R A R Y >--------------------------------------------------------
Formats an OpenLibrary link, and checks for associated errors.
]]
local function openlibrary(id, access)
local code;
local handler = cfg.id_handlers['OL'];
local ident;
ident, code = id:gsub('^OL', ''):match("^(%d+([AMW]))$"); -- optional OL prefix followed immediately by digits followed by 'A', 'M', or 'W'; remove OL prefix
if not is_set (ident) then -- if malformed return an error
return external_link_id({link=handler.link, label=handler.label, q = handler.q,
prefix=handler.prefix .. 'OL',
id=id, separator=handler.separator, encode = handler.encode,
access = access}) .. ' ' .. set_error( 'bad_ol' );
end
id = ident; -- use ident without the optional OL prefix (it has been removed)
if ( code == "A" ) then
return external_link_id({link=handler.link, label=handler.label, q = handler.q,
prefix=handler.prefix .. 'authors/OL',
id=id, separator=handler.separator, encode = handler.encode,
access = access})
end
if ( code == "M" ) then
return external_link_id({link=handler.link, label=handler.label, q = handler.q,
prefix=handler.prefix .. 'books/OL',
id=id, separator=handler.separator, encode = handler.encode,
access = access})
end
if ( code == "W" ) then
return external_link_id({link=handler.link, label=handler.label, q = handler.q,
prefix=handler.prefix .. 'works/OL',
id=id, separator=handler.separator, encode = handler.encode,
access = access})
end
end
--[[--------------------------< P M C >------------------------------------------------------------------------
Format a PMC, do simple error checking, and check for embargoed articles.
The embargo parameter takes a date for a value. If the embargo date is in the future the PMC identifier will not
be linked to the article. If the embargo date is today or in the past, or if it is empty or omitted, then the
PMC identifier is linked to the article through the link at cfg.id_handlers['PMC'].prefix.
PMC embargo date testing is done in function is_embargoed () which is called earlier because when the citation
has |pmc=<value> but does not have a |url= then |title= is linked with the PMC link. Function is_embargoed ()
returns the embargo date if the PMC article is still embargoed, otherwise it returns an empty string.
PMCs are sequential numbers beginning at 1 and counting up. This code checks the PMC to see that it contains only digits and is less
than test_limit; the value in local variable test_limit will need to be updated periodically as more PMCs are issued.
]]
local function pmc(id, embargo)
local test_limit = 8000000; -- update this value as PMCs approach
local handler = cfg.id_handlers['PMC'];
local err_cat = ''; -- presume that PMC is valid
local id_num;
local text;
id_num = id:match ('^[Pp][Mm][Cc](%d+)$'); -- identifier with pmc prefix
if is_set (id_num) then
add_maint_cat ('pmc_format');
else -- plain number without pmc prefix
id_num = id:match ('^%d+$'); -- if here id is all digits
end
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if 1 > id_num or test_limit < id_num then -- if PMC is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message
else
id = tostring (id_num); -- make sure id is a string
end
else -- when id format incorrect
err_cat = ' ' .. set_error( 'bad_pmc' ); -- set an error message
end
if is_set (embargo) then -- is PMC is still embargoed?
text = table.concat ( -- still embargoed so no external link
{
make_wikilink (handler.link, handler.label),
handler.separator,
id,
err_cat
});
else
text = external_link_id({link = handler.link, label = handler.label, q = handler.q, -- no embargo date or embargo has expired, ok to link to article
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat;
end
return text;
end
--[[--------------------------< P M I D >----------------------------------------------------------------------
Format PMID and do simple error checking. PMIDs are sequential numbers beginning at 1 and counting up. This
code checks the PMID to see that it contains only digits and is less than test_limit; the value in local variable
test_limit will need to be updated periodically as more PMIDs are issued.
]]
local function pmid(id)
local test_limit = 33000000; -- update this value as PMIDs approach
local handler = cfg.id_handlers['PMID'];
local err_cat = ''; -- presume that PMID is valid
if id:match("[^%d]") then -- if PMID has anything but digits
err_cat = ' ' .. set_error( 'bad_pmid' ); -- set an error message
else -- PMID is only digits
local id_num = tonumber(id); -- convert id to a number for range testing
if 1 > id_num or test_limit < id_num then -- if PMID is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_pmid' ); -- set an error message
end
end
return external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat;
end
--[[--------------------------< S S R N >----------------------------------------------------------------------
Format an ssrn, do simple error checking
SSRNs are sequential numbers beginning at 100? and counting up. This code checks the ssrn to see that it is
only digits and is greater than 99 and less than test_limit; the value in local variable test_limit will need
to be updated periodically as more SSRNs are issued.
]]
local function ssrn (id)
local test_limit = 3500000; -- update this value as SSRNs approach
local handler = cfg.id_handlers['SSRN'];
local err_cat = ''; -- presume that SSRN is valid
local id_num;
local text;
id_num = id:match ('^%d+$'); -- id must be all digits
if is_set (id_num) then -- id_num has a value so test it
id_num = tonumber(id_num); -- convert id_num to a number for range testing
if 100 > id_num or test_limit < id_num then -- if SSRN is outside test limit boundaries
err_cat = ' ' .. set_error( 'bad_ssrn' ); -- set an error message
end
else -- when id format incorrect
err_cat = ' ' .. set_error( 'bad_ssrn' ); -- set an error message
end
text = external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode, access=handler.access}) .. err_cat;
return text;
end
--[[--------------------------< U S E N E T _ I D >------------------------------------------------------------
Validate and format a usenet message id. Simple error checking, looks for 'id-left@id-right' not enclosed in
'<' and/or '>' angle brackets.
]]
local function usenet_id (id)
local handler = cfg.id_handlers['USENETID'];
local text = external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode})
if not id:match('^.+@.+$') or not id:match('^[^<].*[^>]$')then -- doesn't have '@' or has one or first or last character is '< or '>'
text = text .. ' ' .. set_error( 'bad_usenet_id' ) -- add an error message if the message id is invalid
end
return text
end
--[[--------------------------< Z B L >-----------------------------------------------------------------------
A numerical identifier in the form nnnn.nnnnn - leading zeros in the first quartet optional
format described here: http://emis.mi.sanu.ac.rs/ZMATH/zmath/en/help/search/
temporary format is apparently eight digits. Anything else is an error
]]
local function zbl (id)
local handler = cfg.id_handlers['ZBL'];
local err_cat = '';
if id:match('^%d%d%d%d%d%d%d%d$') then -- is this identifier using temporary format?
add_maint_cat ('zbl'); -- yes, add maint cat
elseif not id:match('^%d?%d?%d?%d%.%d%d%d%d%d$') then -- not temporary, is it normal format?
err_cat = ' ' .. set_error( 'bad_zbl' ); -- no, set an error message
end
return external_link_id({link = handler.link, label = handler.label, q = handler.q,
prefix=handler.prefix,id=id,separator=handler.separator, encode=handler.encode}) .. err_cat;
end
--============================<< I N T E R F A C E F U N C T I O N S >>==========================================
--[[--------------------------< B U I L D _ I D _ L I S T >--------------------------------------------------------
Takes a table of IDs created by extract_ids() and turns it into a table of formatted ID outputs.
inputs:
id_list – table of identifiers built by extract_ids()
options – table of various template parameter values used to modify some manually handled identifiers
]]
local function build_id_list( id_list, options )
local new_list, handler = {};
local function fallback(k) return { __index = function(t,i) return cfg.id_handlers[k][i] end } end;
for k, v in pairs( id_list ) do -- k is uc identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table
-- fallback to read-only cfg
handler = setmetatable( { ['id'] = v, ['access'] = options.IdAccessLevels[k] }, fallback(k) );
if handler.mode == 'external' then
table.insert( new_list, {handler.label, external_link_id( handler ) } );
elseif handler.mode == 'internal' then
table.insert( new_list, {handler.label, internal_link_id( handler ) } );
elseif handler.mode ~= 'manual' then
error( cfg.messages['unknown_ID_mode'] );
elseif k == 'ARXIV' then
table.insert( new_list, {handler.label, arxiv( v, options.Class ) } );
elseif k == 'ASIN' then
table.insert( new_list, {handler.label, asin( v, options.ASINTLD ) } );
elseif k == 'BIBCODE' then
table.insert( new_list, {handler.label, bibcode( v, handler.access ) } );
elseif k == 'BIORXIV' then
table.insert( new_list, {handler.label, biorxiv( v ) } );
elseif k == 'CITESEERX' then
table.insert( new_list, {handler.label, citeseerx( v ) } );
elseif k == 'DOI' then
table.insert( new_list, {handler.label, doi( v, options.DoiBroken, handler.access ) } );
elseif k == 'EISSN' then
table.insert( new_list, {handler.label, issn( v, true ) } ); -- true distinguishes eissn from issn
elseif k == 'HDL' then
table.insert( new_list, {handler.label, hdl( v, handler.access ) } );
elseif k == 'ISBN' then
local ISBN = internal_link_id( handler );
local check;
local err_type = '';
check, err_type = isbn( v );
if not check then
if is_set(options.IgnoreISBN) then -- ISBN is invalid; if |ignore-isbn-error= set
add_maint_cat ('ignore_isbn_err'); -- ad a maint category
else
ISBN = ISBN .. set_error( 'bad_isbn', {err_type}, false, " ", "" ); -- else display an error message
end
elseif is_set(options.IgnoreISBN) then -- ISBN is OK; if |ignore-isbn-error= set
add_maint_cat ('ignore_isbn_err'); -- because |ignore-isbn-error= unnecessary
end
table.insert( new_list, {handler.label, ISBN } );
elseif k == 'ISMN' then
table.insert( new_list, {handler.label, ismn( v ) } );
elseif k == 'ISSN' then
table.insert( new_list, {handler.label, issn( v ) } );
elseif k == 'JFM' then
table.insert( new_list, {handler.label, jfm( v ) } );
elseif k == 'LCCN' then
table.insert( new_list, {handler.label, lccn( v ) } );
elseif k == 'MR' then
table.insert( new_list, {handler.label, mr( v ) } );
elseif k == 'OCLC' then
table.insert( new_list, {handler.label, oclc( v ) } );
elseif k == 'OL' or k == 'OLA' then
table.insert( new_list, {handler.label, openlibrary( v, handler.access ) } );
elseif k == 'PMC' then
table.insert( new_list, {handler.label, pmc( v, options.Embargo ) } );
elseif k == 'PMID' then
table.insert( new_list, {handler.label, pmid( v ) } );
elseif k == 'SSRN' then
table.insert( new_list, {handler.label, ssrn( v ) } );
elseif k == 'USENETID' then
table.insert( new_list, {handler.label, usenet_id( v ) } );
elseif k == 'ZBL' then
table.insert( new_list, {handler.label, zbl( v ) } );
else
error( cfg.messages['unknown_manual_ID'] );
end
end
local function comp( a, b ) -- used in following table.sort()
return a[1]:lower() < b[1]:lower();
end
table.sort( new_list, comp );
for k, v in ipairs( new_list ) do
new_list[k] = v[2];
end
return new_list;
end
--[[--------------------------< E X T R A C T _ I D S >------------------------------------------------------------
Populates ID table from arguments using configuration settings. Loops through cfg.id_handlers and searches args for
any of the parameters listed in each cfg.id_handlers['...'].parameters. If found, adds the parameter and value to
the identifier list. Emits redundant error message is more than one alias exists in args
]]
local function extract_ids( args )
local id_list = {}; -- list of identifiers found in args
for k, v in pairs( cfg.id_handlers ) do -- k is uc identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table
v = select_one( args, v.parameters, 'redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present
if is_set(v) then id_list[k] = v; end -- if found in args, add identifier to our list
end
return id_list;
end
--[[--------------------------< E X T R A C T _ I D _ A C C E S S _ L E V E L S >--------------------------------------
Fetches custom id access levels from arguments using configuration settings.
Parameters which have a predefined access level (e.g. arxiv) do not use this
function as they are directly rendered as free without using an additional parameter.
access-level values must match the case used in cfg.keywords_lists['id-access'] (lowercase unless there is some special reason for something else)
]]
local function extract_id_access_levels( args, id_list )
local id_accesses_list = {};
for k, v in pairs( cfg.id_handlers ) do
local access_param = v.custom_access; -- name of identifier's access-level parameter
if is_set(access_param) then
local access_level = args[access_param]; -- get the assigned value if there is one
if is_set (access_level) then
if not in_array (access_level, cfg.keywords_lists['id-access']) then -- exact match required
table.insert( z.message_tail, { set_error( 'invalid_param_val', {access_param, access_level}, true ) } );
access_level = nil; -- invalid so unset
end
if not is_set(id_list[k]) then -- identifer access-level must have a matching identifier
table.insert( z.message_tail, { set_error( 'param_access_requires_param', {k:lower()}, true ) } ); -- param name is uppercase in cfg.id_handlers (k); lowercase for error message
end
id_accesses_list[k] = cfg.keywords_xlate[access_level]; -- get translated keyword
end
end
end
return id_accesses_list;
end
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr, utilities_page_ptr)
cfg = cfg_table_ptr;
is_set = utilities_page_ptr.is_set; -- import functions from select Module:Citation/CS1/Utilities module
in_array = utilities_page_ptr.in_array;
set_error = utilities_page_ptr.set_error;
select_one = utilities_page_ptr.select_one;
add_maint_cat = utilities_page_ptr.add_maint_cat;
substitute = utilities_page_ptr.substitute;
make_wikilink = utilities_page_ptr.make_wikilink;
z = utilities_page_ptr.z; -- table of tables in Module:Citation/CS1/Utilities
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
build_id_list = build_id_list,
extract_ids = extract_ids,
extract_id_access_levels = extract_id_access_levels,
is_embargoed = is_embargoed;
set_selected_modules = set_selected_modules;
}
c8f37fef539a198c6d0c5621de3fd2ef7a455f40
Модуль:Citation/CS1/COinS
828
15
18
2022-07-19T12:38:50Z
CyberTailor
2
import module
Scribunto
text/plain
--[[--------------------------< F O R W A R D D E C L A R A T I O N S >--------------------------------------
]]
local is_set, in_array, remove_wiki_link, strip_apostrophe_markup; -- functions in Module:Citation/CS1/Utilities
local cfg; -- table of configuration tables that are defined in Module:Citation/CS1/Configuration
--[[--------------------------< M A K E _ C O I N S _ T I T L E >----------------------------------------------
Makes a title for COinS from Title and / or ScriptTitle (or any other name-script pairs)
Apostrophe markup (bold, italics) is stripped from each value so that the COinS metadata isn't corrupted with strings
of %27%27...
]]
local function make_coins_title (title, script)
if is_set (title) then
title = strip_apostrophe_markup (title); -- strip any apostrophe markup
else
title=''; -- if not set, make sure title is an empty string
end
if is_set (script) then
script = script:gsub ('^%l%l%s*:%s*', ''); -- remove language prefix if present (script value may now be empty string)
script = strip_apostrophe_markup (script); -- strip any apostrophe markup
else
script=''; -- if not set, make sure script is an empty string
end
if is_set (title) and is_set (script) then
script = ' ' .. script; -- add a space before we concatenate
end
return title .. script; -- return the concatenation
end
--[[--------------------------< E S C A P E _ L U A _ M A G I C _ C H A R S >----------------------------------
Returns a string where all of lua's magic characters have been escaped. This is important because functions like
string.gsub() treat their pattern and replace strings as patterns, not literal strings.
]]
local function escape_lua_magic_chars (argument)
argument = argument:gsub("%%", "%%%%"); -- replace % with %%
argument = argument:gsub("([%^%$%(%)%.%[%]%*%+%-%?])", "%%%1"); -- replace all other lua magic pattern characters
return argument;
end
--[[--------------------------< G E T _ C O I N S _ P A G E S >------------------------------------------------
Extract page numbers from external wikilinks in any of the |page=, |pages=, or |at= parameters for use in COinS.
]]
local function get_coins_pages (pages)
local pattern;
if not is_set (pages) then return pages; end -- if no page numbers then we're done
while true do
pattern = pages:match("%[(%w*:?//[^ ]+%s+)[%w%d].*%]"); -- pattern is the opening bracket, the url and following space(s): "[url "
if nil == pattern then break; end -- no more urls
pattern = escape_lua_magic_chars (pattern); -- pattern is not a literal string; escape lua's magic pattern characters
pages = pages:gsub(pattern, ""); -- remove as many instances of pattern as possible
end
pages = pages:gsub("[%[%]]", ""); -- remove the brackets
pages = pages:gsub("–", "-" ); -- replace endashes with hyphens
pages = pages:gsub("&%w+;", "-" ); -- and replace html entities (– etc.) with hyphens; do we need to replace numerical entities like   and the like?
return pages;
end
--[=[-------------------------< C O I N S _ R E P L A C E _ M A T H _ S T R I P M A R K E R >------------------
There are three options for math markup rendering that depend on the editor's math preference settings. These
settings are at [[Special:Preferences#mw-prefsection-rendering]] and are
PNG images
TeX source
MathML with SVG or PNG fallback
All three are heavy with html and css which doesn't belong in the metadata.
Without this function, the metadata saved in the raw wikitext contained the rendering determined by the settings
of the last editor to save the page.
This function gets the rendered form of an equation according to the editor's preference before the page is saved. It
then searches the rendering for the text equivalent of the rendered equation and replaces the rendering with that so
that the page is saved without extraneous html/css markup and with a reasonably readable text form of the equation.
When a replacement is made, this function returns true and the value with replacement; otherwise false and the intital
value. To replace multipe equations it is necesary to call this function from within a loop.
]=]
local function coins_replace_math_stripmarker (value)
local stripmarker = cfg.stripmarkers['math'];
local rendering = value:match (stripmarker); -- is there a math stripmarker
if not rendering then -- when value doesn't have a math stripmarker, abandon this test
return false, value;
end
rendering = mw.text.unstripNoWiki (rendering); -- convert stripmarker into rendered value (or nil? ''? when math render error)
if rendering:match ('alt="[^"]+"') then -- if PNG math option
rendering = rendering:match ('alt="([^"]+)"'); -- extract just the math text
elseif rendering:match ('$%s+.+%s+%$') then -- if TeX math option; $ is legit character that is escapes as \$
rendering = rendering:match ('$%s+(.+)%s+%$') -- extract just the math text
elseif rendering:match ('<annotation[^>]+>.+</annotation>') then -- if MathML math option
rendering = rendering:match ('<annotation[^>]+>(.+)</annotation>') -- extract just the math text
else
return false, value; -- had math stripmarker but not one of the three defined forms
end
return true, value:gsub (stripmarker, rendering, 1);
end
--[[--------------------------< C O I N S _ C L E A N U P >----------------------------------------------------
Cleanup parameter values for the metadata by removing or replacing invisible characters and certain html entities.
2015-12-10: there is a bug in mw.text.unstripNoWiki (). It replaces math stripmarkers with the appropriate content
when it shouldn't. See https://phabricator.wikimedia.org/T121085 and Wikipedia_talk:Lua#stripmarkers_and_mw.text.unstripNoWiki.28.29
TODO: move the replacement patterns and replacement values into a table in /Configuration similar to the invisible
characters table?
]]
local function coins_cleanup (value)
local replaced = true; -- default state to get the do loop running
while replaced do -- loop until all math stripmarkers replaced
replaced, value = coins_replace_math_stripmarker (value); -- replace math stripmarker with text representation of the equation
end
value = value:gsub (cfg.stripmarkers['math'], "MATH RENDER ERROR"); -- one or more couldn't be replaced; insert vague error message
value = mw.text.unstripNoWiki (value); -- replace nowiki stripmarkers with their content
value = value:gsub ('<span class="nowrap" style="padding%-left:0%.1em;">'(s?)</span>', "'%1"); -- replace {{'}} or {{'s}} with simple apostrophe or apostrophe-s
value = value:gsub (' ', ' '); -- replace entity with plain space
value = value:gsub ('\226\128\138', ' '); -- replace hair space with plain space
if not mw.ustring.find (value, cfg.indic_script) then -- don't remove zero width joiner characters from indic script
value = value:gsub ('‍', ''); -- remove ‍ entities
value = mw.ustring.gsub (value, '[\226\128\141\226\128\139\194\173]', ''); -- remove zero-width joiner, zero-width space, soft hyphen
end
value = value:gsub ('[\009\010\013]', ' '); -- replace horizontal tab, line feed, carriage return with plain space
return value;
end
--[[--------------------------< C O I N S >--------------------------------------------------------------------
COinS metadata (see <http://ocoins.info/>) allows automated tools to parse the citation information.
]]
local function COinS(data, class)
if 'table' ~= type(data) or nil == next(data) then
return '';
end
for k, v in pairs (data) do -- spin through all of the metadata parameter values
if 'ID_list' ~= k and 'Authors' ~= k then -- except the ID_list and Author tables (author nowiki stripmarker done when Author table processed)
data[k] = coins_cleanup (v);
end
end
local ctx_ver = "Z39.88-2004";
-- treat table strictly as an array with only set values.
local OCinSoutput = setmetatable( {}, {
__newindex = function(self, key, value)
if is_set(value) then
rawset( self, #self+1, table.concat{ key, '=', mw.uri.encode( remove_wiki_link( value ) ) } );
end
end
});
if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn', 'journal', 'news', 'magazine'}) or (in_array (class, {'conference', 'interview', 'map', 'press release', 'web'}) and is_set(data.Periodical)) or
('citation' == class and is_set(data.Periodical) and not is_set (data.Encyclopedia)) then
OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:journal"; -- journal metadata identifier
if in_array (class, {'arxiv', 'biorxiv', 'citeseerx', 'ssrn'}) then -- set genre according to the type of citation template we are rendering
OCinSoutput["rft.genre"] = "preprint"; -- cite arxiv, cite biorxiv, cite citeseerx, cite ssrn
elseif 'conference' == class then
OCinSoutput["rft.genre"] = "conference"; -- cite conference (when Periodical set)
elseif 'web' == class then
OCinSoutput["rft.genre"] = "unknown"; -- cite web (when Periodical set)
else
OCinSoutput["rft.genre"] = "article"; -- journal and other 'periodical' articles
end
OCinSoutput["rft.jtitle"] = data.Periodical; -- journal only
OCinSoutput["rft.atitle"] = data.Title; -- 'periodical' article titles
-- these used only for periodicals
OCinSoutput["rft.ssn"] = data.Season; -- keywords: winter, spring, summer, fall
OCinSoutput["rft.chron"] = data.Chron; -- free-form date components
OCinSoutput["rft.volume"] = data.Volume; -- does not apply to books
OCinSoutput["rft.issue"] = data.Issue;
OCinSoutput["rft.pages"] = data.Pages; -- also used in book metadata
elseif 'thesis' ~= class then -- all others except cite thesis are treated as 'book' metadata; genre distinguishes
OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:book"; -- book metadata identifier
if 'report' == class or 'techreport' == class then -- cite report and cite techreport
OCinSoutput["rft.genre"] = "report";
elseif 'conference' == class then -- cite conference when Periodical not set
OCinSoutput["rft.genre"] = "conference";
OCinSoutput["rft.atitle"] = data.Chapter; -- conference paper as chapter in proceedings (book)
elseif in_array (class, {'book', 'citation', 'encyclopaedia', 'interview', 'map'}) then
if is_set (data.Chapter) then
OCinSoutput["rft.genre"] = "bookitem";
OCinSoutput["rft.atitle"] = data.Chapter; -- book chapter, encyclopedia article, interview in a book, or map title
else
if 'map' == class or 'interview' == class then
OCinSoutput["rft.genre"] = 'unknown'; -- standalone map or interview
else
OCinSoutput["rft.genre"] = 'book'; -- book and encyclopedia
end
end
else --{'audio-visual', 'AV-media-notes', 'DVD-notes', 'episode', 'interview', 'mailinglist', 'map', 'newsgroup', 'podcast', 'press release', 'serial', 'sign', 'speech', 'web'}
OCinSoutput["rft.genre"] = "unknown";
end
OCinSoutput["rft.btitle"] = data.Title; -- book only
OCinSoutput["rft.place"] = data.PublicationPlace; -- book only
OCinSoutput["rft.series"] = data.Series; -- book only
OCinSoutput["rft.pages"] = data.Pages; -- book, journal
OCinSoutput["rft.edition"] = data.Edition; -- book only
OCinSoutput["rft.pub"] = data.PublisherName; -- book and dissertation
else -- cite thesis
OCinSoutput.rft_val_fmt = "info:ofi/fmt:kev:mtx:dissertation"; -- dissertation metadata identifier
OCinSoutput["rft.title"] = data.Title; -- dissertation (also patent but that is not yet supported)
OCinSoutput["rft.degree"] = data.Degree; -- dissertation only
OCinSoutput['rft.inst'] = data.PublisherName; -- book and dissertation
end
-- and now common parameters (as much as possible)
OCinSoutput["rft.date"] = data.Date; -- book, journal, dissertation
for k, v in pairs( data.ID_list ) do -- what to do about these? For now assume that they are common to all?
if k == 'ISBN' then v = v:gsub( "[^-0-9X]", "" ); end
local id = cfg.id_handlers[k].COinS;
if string.sub( id or "", 1, 4 ) == 'info' then -- for ids that are in the info:registry
OCinSoutput["rft_id"] = table.concat{ id, "/", v };
elseif string.sub (id or "", 1, 3 ) == 'rft' then -- for isbn, issn, eissn, etc that have defined COinS keywords
OCinSoutput[ id ] = v;
elseif id then -- when cfg.id_handlers[k].COinS is not nil
OCinSoutput["rft_id"] = table.concat{ cfg.id_handlers[k].prefix, v }; -- others; provide a url
end
end
local last, first;
for k, v in ipairs( data.Authors ) do
last, first = coins_cleanup (v.last), coins_cleanup (v.first or ''); -- replace any nowiki strip markers, non-printing or invisible characers
if k == 1 then -- for the first author name only
if is_set(last) and is_set(first) then -- set these COinS values if |first= and |last= specify the first author name
OCinSoutput["rft.aulast"] = last; -- book, journal, dissertation
OCinSoutput["rft.aufirst"] = first; -- book, journal, dissertation
elseif is_set(last) then
OCinSoutput["rft.au"] = last; -- book, journal, dissertation -- otherwise use this form for the first name
end
else -- for all other authors
if is_set(last) and is_set(first) then
OCinSoutput["rft.au"] = table.concat{ last, ", ", first }; -- book, journal, dissertation
elseif is_set(last) then
OCinSoutput["rft.au"] = last; -- book, journal, dissertation
end
end
end
OCinSoutput.rft_id = data.URL;
OCinSoutput.rfr_id = table.concat{ "info:sid/", mw.site.server:match( "[^/]*$" ), ":", data.RawPage };
OCinSoutput = setmetatable( OCinSoutput, nil );
-- sort with version string always first, and combine.
--table.sort( OCinSoutput );
table.insert( OCinSoutput, 1, "ctx_ver=" .. ctx_ver ); -- such as "Z39.88-2004"
return table.concat(OCinSoutput, "&");
end
--[[--------------------------< S E T _ S E L E C T E D _ M O D U L E S >--------------------------------------
Sets local cfg table and imported functions table to same (live or sandbox) as that used by the other modules.
]]
local function set_selected_modules (cfg_table_ptr, utilities_page_ptr)
cfg = cfg_table_ptr;
is_set = utilities_page_ptr.is_set; -- import functions from selected Module:Citation/CS1/Utilities module
in_array = utilities_page_ptr.in_array;
remove_wiki_link = utilities_page_ptr.remove_wiki_link;
strip_apostrophe_markup = utilities_page_ptr.strip_apostrophe_markup;
end
--[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------
]]
return {
make_coins_title = make_coins_title,
get_coins_pages = get_coins_pages,
COinS = COinS,
set_selected_modules = set_selected_modules,
}
b5ddcb88ee3e52bb23321d231c25c7886747b1be
Модуль:Citation/CS1/styles.css
828
16
20
2022-07-19T12:45:53Z
CyberTailor
2
import
sanitized-css
text/css
/*-------------------------< O V E R R I D E S >--------------------------------
cs1|2 references are wrapped in <cite>...</cite> tags. Some wikis have not
chosen to override the generic user agent italic styling as en.wiki has. This
(untested) styling should override the user agent default when cs1|2 templates
are rendered.
Similarly, some languages use different quotation punctuation so that setting
is also made available here.
*/
cite.citation {
/* Reset italic styling set by user agent (only for cs1|2 templates; the
reason for the .citation qualifier) */
font-style: inherit;
}
.citation q {
/* Straight quote marks for <q>; keep same as [[MediaWiki:Common.css]] */
quotes: '"' '"' "'" "'";
}
/* ID and URL access
Both core and Common.css have selector .mw-parser-output a[href$=".pdf"].external
for PDF pages. All TemplateStyles pages are hoisted to .mw-parser-output. We need
to have specificity equal to a[href$=".pdf"].external for locks to override PDF icon.
the .id-lock-... selectors are for use by non-citation templates like {{Catalog lookup link}}
*/
.id-lock-free a,
.citation .cs1-lock-free a {
background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png);
background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg);
background-repeat: no-repeat;
background-size: 9px;
background-position: right .1em center;
}
.id-lock-limited a,
.id-lock-registration a,
.citation .cs1-lock-limited a,
.citation .cs1-lock-registration a {
background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png);
background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/d/d6/Lock-gray-alt-2.svg);
background-repeat: no-repeat;
background-size: 9px;
background-position: right .1em center;
}
.id-lock-subscription a,
.citation .cs1-lock-subscription a {
background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png);
background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/a/aa/Lock-red-alt-2.svg);
background-repeat: no-repeat;
background-size: 9px;
background-position: right .1em center;
}
.cs1-subscription,
.cs1-registration {
color: #555;
}
.cs1-subscription span,
.cs1-registration span {
border-bottom: 1px dotted;
cursor: help;
}
/* Wikisource icon
Experiment to see if it is possible/practical to add support for a wikisource
icon when |chapter= or |title= is wikilinked to a source in wikisource ala cite wikisource
*/
.cs1-ws-icon a {
background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png);
background-image: linear-gradient(transparent, transparent), url(//upload.wikimedia.org/wikipedia/commons/4/4c/Wikisource-logo.svg);
background-repeat: no-repeat;
background-size: 12px;
background-position: right .1em center;
}
/* Errors and maintenance */
code.cs1-code {
/* <code>...</code> style override: mediawiki's css definition is specified here:
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/69cd73811f7aadd093050dbf20ed70ef0b42a713/skins%2Fcommon%2FcommonElements.css#L199
*/
color: inherit;
background: inherit;
border: inherit; /* code editor doesn't like inherit with border?
https://www.w3.org/wiki/CSS/Properties/border
suggests that inherit is ok
the actual spec says the code editor is correct:
https://www.w3.org/TR/css-backgrounds-3/#borders
*/
padding: inherit;
}
.cs1-hidden-error {
display: none;
font-size: 100%;
}
.cs1-visible-error {
font-size: 100%;
}
.cs1-maint {
display: none;
color: #33aa33;
margin-left: 0.3em;
}
/* Small text size
Set small text size in one place. 0.95 (here) * 0.9 (from references list) is
~0.85, which is the lower bound for size for accessibility. Old styling for this
was just 0.85. We could write the rule so that when this template is inside
references/reflist, only then does it multiply by 0.95; else multiply by 0.85 */
.cs1-subscription,
.cs1-registration,
.cs1-format {
font-size: 95%;
}
/* kerning */
.cs1-kern-left,
.cs1-kern-wl-left {
padding-left: 0.2em;
}
.cs1-kern-right,
.cs1-kern-wl-right {
padding-right: 0.2em;
}
/* selflinks – avoid bold font style when cs1|2 template links to the current page */
.citation .mw-selflink {
font-weight: inherit;
}
6f79638de6f527eb5ee697056cfd51bf2ad213ae
Тюменское движение НЕТВОЙНЕ
0
17
21
2022-07-19T12:47:36Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{DISPLAYTITLE:Тюменское движение #НЕТВОЙНЕ}}
{{РегОрг
|Лого=Image:Nowar72_logo.jpg
|Регион=Юг Тюменской области
|Деятельность=
* [[Митинг|Уличные акции]]
* Расклейка [[листовка|листовок]] и [[стикер]]ов
* Поддержка политзаключённых
|Сайт=https://nowar72.info
|Канал={{Канал|nowar72}}
}}
'''Тюменское движение #НЕТВОЙНЕ''' — независимая антивоенная организация.
== История ==
Были одними из организаторов [[митинг]]ов 6 и 13 марта в Тюмени. В обоих случаях акции провести не удалось из-за оцепления площади полицией.
== Известные активисты ==
* [[Кирилл Мартюшев]] — политзаключённый<ref>{{cite web|url=https://novayagazeta.ru/articles/2022/03/07/ugolovnyi-kodeks-mira|title=Уголовный кодекс «мира»|date=2022-03-07}}</ref>.
== Примечания ==
{{примечания}}
04bcf7a7436481ac01f9532b9dcdd382240aa01d
22
21
2022-07-19T13:00:05Z
CyberTailor
2
название в карточке
wikitext
text/x-wiki
{{РегОрг
|Лого=Image:Nowar72_logo.jpg
|Название=Тюменское движение #НЕТВОЙНЕ
|Регион=Юг Тюменской области
|Деятельность=
* [[Митинг|Уличные акции]]
* Расклейка [[листовка|листовок]] и [[стикер]]ов
* Поддержка политзаключённых
|Сайт=https://nowar72.info
|Канал={{Канал|nowar72}}
}}
'''Тюменское движение #НЕТВОЙНЕ''' — независимая антивоенная организация.
== История ==
Были одними из организаторов [[митинг]]ов 6 и 13 марта в Тюмени. В обоих случаях акции провести не удалось из-за оцепления площади полицией.
== Известные активисты ==
* [[Кирилл Мартюшев]] — политзаключённый<ref>{{cite web|url=https://novayagazeta.ru/articles/2022/03/07/ugolovnyi-kodeks-mira|title=Уголовный кодекс «мира»|date=2022-03-07}}</ref>.
== Примечания ==
{{примечания}}
974c1b9aa37104a223c4eb614763fd9001e45e40
29
22
2022-07-19T13:19:48Z
CyberTailor
2
плашка
wikitext
text/x-wiki
{{неверный заголовок|Тюменское движение #НЕТВОЙНЕ}}
{{РегОрг
|Лого=Image:Nowar72_logo.jpg
|Название=Тюменское движение #НЕТВОЙНЕ
|Регион=Юг Тюменской области
|Деятельность=
* [[Митинг|Уличные акции]]
* Расклейка [[листовка|листовок]] и [[стикер]]ов
* Поддержка политзаключённых
|Сайт=https://nowar72.info
|Канал={{Канал|nowar72}}
}}
'''Тюменское движение #НЕТВОЙНЕ''' — независимая антивоенная организация.
== История ==
Были одними из организаторов [[митинг]]ов 6 и 13 марта в Тюмени. В обоих случаях акции провести не удалось из-за оцепления площади полицией.
== Известные активисты ==
* [[Кирилл Мартюшев]] — политзаключённый<ref>{{cite web|url=https://novayagazeta.ru/articles/2022/03/07/ugolovnyi-kodeks-mira|title=Уголовный кодекс «мира»|date=2022-03-07}}</ref>.
== Примечания ==
{{примечания}}
204c67f890253539d99ec0b624ead18d77f890da
Модуль:Hatnote
828
18
23
2022-07-19T13:09:22Z
CyberTailor
2
import module
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Module:Hatnote --
-- --
-- This module produces hatnote links and links to related articles. It --
-- implements the {{hatnote}} and {{format link}} meta-templates and includes --
-- helper functions for other Lua hatnote modules. --
--------------------------------------------------------------------------------
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg
local mArguments -- lazily initialise [[Module:Arguments]]
local yesno -- lazily initialise [[Module:Yesno]]
local formatLink -- lazily initialise [[Module:Format link]] ._formatLink
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local curNs = mw.title.getCurrentTitle().namespace
p.missingTargetCat =
--Default missing target category, exported for use in related modules
((curNs == 0) or (curNs == 14)) and
'Articles with hatnote templates targeting a nonexistent page' or nil
local function getArgs(frame)
-- Fetches the arguments from the parent frame. Whitespace is trimmed and
-- blanks are removed.
mArguments = require('Module:Arguments')
return mArguments.getArgs(frame, {parentOnly = true})
end
local function removeInitialColon(s)
-- Removes the initial colon from a string, if present.
return s:match('^:?(.*)')
end
function p.findNamespaceId(link, removeColon)
-- Finds the namespace id (namespace number) of a link or a pagename. This
-- function will not work if the link is enclosed in double brackets. Colons
-- are trimmed from the start of the link by default. To skip colon
-- trimming, set the removeColon parameter to false.
checkType('findNamespaceId', 1, link, 'string')
checkType('findNamespaceId', 2, removeColon, 'boolean', true)
if removeColon ~= false then
link = removeInitialColon(link)
end
local namespace = link:match('^(.-):')
if namespace then
local nsTable = mw.site.namespaces[namespace]
if nsTable then
return nsTable.id
end
end
return 0
end
function p.makeWikitextError(msg, helpLink, addTrackingCategory, title)
-- Formats an error message to be returned to wikitext. If
-- addTrackingCategory is not false after being returned from
-- [[Module:Yesno]], and if we are not on a talk page, a tracking category
-- is added.
checkType('makeWikitextError', 1, msg, 'string')
checkType('makeWikitextError', 2, helpLink, 'string', true)
yesno = require('Module:Yesno')
title = title or mw.title.getCurrentTitle()
-- Make the help link text.
local helpText
if helpLink then
helpText = ' ([[' .. helpLink .. '|help]])'
else
helpText = ''
end
-- Make the category text.
local category
if not title.isTalkPage -- Don't categorise talk pages
and title.namespace ~= 2 -- Don't categorise userspace
and yesno(addTrackingCategory) ~= false -- Allow opting out
then
category = 'Hatnote templates with errors'
category = mw.ustring.format(
'[[%s:%s]]',
mw.site.namespaces[14].name,
category
)
else
category = ''
end
return mw.ustring.format(
'<strong class="error">Error: %s%s.</strong>%s',
msg,
helpText,
category
)
end
function p.disambiguate(page, disambiguator)
-- Formats a page title with a disambiguation parenthetical,
-- i.e. "Example" → "Example (disambiguation)".
checkType('disambiguate', 1, page, 'string')
checkType('disambiguate', 2, disambiguator, 'string', true)
disambiguator = disambiguator or 'disambiguation'
return mw.ustring.format('%s (%s)', page, disambiguator)
end
--------------------------------------------------------------------------------
-- Hatnote
--
-- Produces standard hatnote text. Implements the {{hatnote}} template.
--------------------------------------------------------------------------------
function p.hatnote(frame)
local args = getArgs(frame)
local s = args[1]
if not s then
return p.makeWikitextError(
'no text specified',
'Template:Hatnote#Errors',
args.category
)
end
return p._hatnote(s, {
extraclasses = args.extraclasses,
selfref = args.selfref
})
end
function p._hatnote(s, options)
checkType('_hatnote', 1, s, 'string')
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local inline = options.inline
local hatnote = mw.html.create(inline == 1 and 'span' or 'div')
local extraclasses
if type(options.extraclasses) == 'string' then
extraclasses = options.extraclasses
end
hatnote
:attr('role', 'note')
:addClass(inline == 1 and 'hatnote-inline' or 'hatnote')
:addClass('navigation-not-searchable')
:addClass(extraclasses)
:addClass(options.selfref and 'selfref')
:wikitext(s)
return mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' }
} .. tostring(hatnote)
end
return p
44d8f670e8ea9780e48425da6da49c8a5ba1fc20
Шаблон:Hatnote
10
19
24
2022-07-19T13:10:57Z
CyberTailor
2
import template
wikitext
text/x-wiki
<includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
4a1d1028d07c9056022807a96051e1c82cf2a1c7
Модуль:Arguments
828
20
25
2022-07-19T13:14:50Z
CyberTailor
2
import module
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
Модуль:Hatnote/styles.css
828
21
26
2022-07-19T13:15:52Z
CyberTailor
2
import
sanitized-css
text/css
/* {{pp|small=y}} */
.hatnote {
font-style: italic;
}
/* Limit structure CSS to divs because of [[Module:Hatnote inline]] */
div.hatnote {
/* @noflip */
padding-left: 1.6em;
margin-bottom: 0.5em;
}
.hatnote i {
font-style: normal;
}
/* The templatestyles element inserts a link element before hatnotes.
* TODO: Remove link if/when WMF resolves T200206 */
.hatnote + link + .hatnote {
margin-top: -0.5em;
}
44680ffd6e888866df2cdfa0341af9c7b97da94c
Шаблон:Неверный заголовок
10
22
27
2022-07-19T13:16:16Z
CyberTailor
2
импорт шаблона
wikitext
text/x-wiki
<div id="trestrictions_{{{type|replace}}}">
{{hatnote|1=Правильный заголовок этой {{#switch:{{NAMESPACE}}:|Участник:=страницы участника|Обсуждение участника:=страницы обсуждения участника|Категория:=категории|:=статьи|страницы}} — <span id="trestrictions_correct" style="font-weight:bold;">{{{title|{{{1|{{FULLPAGENAME}}}}}}}}</span>. Он показан некорректно из-за {{{reason|технических ограничений}}}.}}
</div><noinclude>{{documentation}}</noinclude>
7c0478a0aae753a8f7133dcff62888915e256c41
Антивоенный комитет Кубани
0
23
30
2022-07-19T13:37:03Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{РегОрг
|Регион=Краснодарский край
|Деятельность=
* Расклейка [[листовка|листовок]] и [[стикер]]ов
|Канал={{Канал|navalnyKRD}}
}}
'''Антивоенный комитет Кубани''' — антивоенная организация, созданная сторонниками [[Алексей Навальный|Алексея Навального]].
74cf3dc4e96ffeec1cc0f2c5f0b10027091d1e4c
Листовка
0
24
31
2022-07-19T14:13:21Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Листовка''' — относительно крупный лист обычной бумаги с агитационным содержанием, напечатанный или нарисованный от руки.
== Печать ==
Безопаснее всего печатать дома. Идите в типографию только если им полностью доверяете. Если за вами ведётся наружная слежка, вы создаёте для типографии риск обыска — учитывайте и это тоже.
== Расклейка ==
Чтобы наклеить листовку, можно использовать клейстер, клей ПВА, клей-карандаш и двусторонний скотч (по вкусу). Наносить клей ПВА следует буквой ''N''.
Листовки удобнее всего носить в шоппере, но можно и в рюкзаке. Чем быстрее вы всё сделаете, тем меньше вероятность попасться.
Лучшее время для расклейки — поздний вечер и раннее утро, когда темно и малолюдно.
== Правила безопасности ==
# Не выходите на расклейку в одиночку. Всегда кто-то должен стоять на шухере. Если заметите полицию, бегите врассыпную.
# Если вы расклеиваете материалы, носите неприметную одежду. Не ту, которую носите обычно! Также закрывайте лицо и голову, нося маску и кепку. Обязательно. ''И следите за камерами.'' Также надевайте перчатки - лучше подстраховаться от пробивки по отпечаткам.
# Не берите с собой ваш обычный телефон. Возьмите «чистый» мобильник с номером ОВД-Инфо ([tel:+78007070528 8 (800) 707-05-28]).
# Если вы хотите сфотографировать результаты трудов своих, сделайте это потом. Сначала сходили расклеить, через какое-то время пошли уже в качестве обычного прохожего и сфотографировали как бы мимоходом. Заодно посмотрите, где их сразу срывают, а где остаются висеть. Фото не храните.
# Не носите с собой много листовок сразу. Только то, что собираетесь сразу расклеить. Попасться с большой партией при себе — плохо.
# Возьмите с собой перцовый баллончик. Он поможет защитить себя от агрессивно настроенных граждан.
# Также не храните запас материалов дома. Если вы печатаете в больших масштабах, обустройте «точку» в месте, которое с вами не свяжут. Добираться туда и обратно нужно также соблюдая меры безопасности — скрывая лицо и путая камеры.
# Не расклеивайте по одним и тем же маршрутам, ''не клейте возле вашего дома'' (иначе там будут рыскать полицаи). Меняйте районы, регулярность и время.
# Если вы передаете материалы другим расклейщикам, а 100% доверия им нет (или по другим причинам боитесь передавать при встрече), можно использовать закладки. Закладки отнимают много сил, но повышают безопасность - особенно, если расклейщики вас не знают.. Тут тоже лучше не покрывать отпечатками материалы и пакеты.
# Если решили действовать так, закладки делайте максимально осторожно. Нельзя попадаться камерам и местным жителям (тем более - ментам). Некоторые места (гаражи, опушки парков) популярны у закладчиков наркотиков, поэтому за ними полицаи особо усердно следят. Лучше вообще класть за городом.
== Публичные архивы ==
* [https://drive.google.com/drive/u/1/folders/1LvTi5oGSHAHH1x03sDNfOpCfPAhxmKBb Движение «Весна»]
* [https://drive.google.com/drive/u/1/folders/1itp5TQnps_MP12sU0rWSagryoYi9MUyB Дочери Сиф]
* [https://drive.google.com/drive/u/1/folders/1yyAPv_vCuL96DTwpwb6BV0mZsZu71Sft Медиа Партизаны]
* [https://drive.google.com/drive/u/1/folders/1x9o10NpwfRoyy09R1_r_XeV0fSHlDQWZ Социалистическая Альтернатива]
992ead9ab500620f09fee6fa3d11af774b2c6ea0
36
31
2022-07-19T14:52:02Z
CyberTailor
2
категория
wikitext
text/x-wiki
'''Листовка''' — относительно крупный лист обычной бумаги с агитационным содержанием, напечатанный или нарисованный от руки.
== Печать ==
Безопаснее всего печатать дома. Идите в типографию только если им полностью доверяете. Если за вами ведётся наружная слежка, вы создаёте для типографии риск обыска — учитывайте и это тоже.
== Расклейка ==
Чтобы наклеить листовку, можно использовать клейстер, клей ПВА, клей-карандаш и двусторонний скотч (по вкусу). Наносить клей ПВА следует буквой ''N''. Двусторонний скотч стоит клеить на листовку заранее, до выхода на расклейку.
Листовки удобнее всего носить в шоппере, но можно и в рюкзаке. Чем быстрее вы всё сделаете, тем меньше вероятность попасться.
Лучшее время для расклейки — поздний вечер и раннее утро, когда темно и малолюдно.
== Правила безопасности ==
# Не выходите на расклейку в одиночку. Всегда кто-то должен стоять на шухере. Если заметите полицию, бегите врассыпную.
# Если вы расклеиваете материалы, носите неприметную одежду. Не ту, которую носите обычно! Также закрывайте лицо и голову, нося маску и кепку. Обязательно. ''И следите за камерами.'' Также надевайте перчатки - лучше подстраховаться от пробивки по отпечаткам.
# Не берите с собой ваш обычный телефон. Возьмите «чистый» мобильник с номером ОВД-Инфо — [tel:+78007070528 8 (800) 707-05-28].
# Если вы хотите сфотографировать результаты трудов своих, сделайте это потом. Сначала сходили расклеить, через какое-то время пошли уже в качестве обычного прохожего и сфотографировали как бы мимоходом. Заодно посмотрите, где их сразу срывают, а где остаются висеть. Фото не храните.
# Не носите с собой много листовок сразу. Только то, что собираетесь сразу расклеить. Попасться с большой партией при себе — плохо.
# Возьмите с собой перцовый баллончик. Он поможет защитить себя от агрессивно настроенных граждан.
# Также не храните запас материалов дома. Если вы печатаете в больших масштабах, обустройте «точку» в месте, которое с вами не свяжут. Добираться туда и обратно нужно также соблюдая меры безопасности — скрывая лицо и путая камеры.
# Не расклеивайте по одним и тем же маршрутам, ''не клейте возле вашего дома'' (иначе там будут рыскать полицаи). Меняйте районы, регулярность и время.
# Если вы передаете материалы другим расклейщикам, а 100% доверия им нет (или по другим причинам боитесь передавать при встрече), можно использовать закладки. Закладки отнимают много сил, но повышают безопасность — особенно, если расклейщики вас не знают.. Тут тоже лучше не покрывать отпечатками материалы и пакеты.
# Если решили действовать так, закладки делайте максимально осторожно. Нельзя попадаться камерам и местным жителям (тем более — ментам). Некоторые места (гаражи, опушки парков) популярны у закладчиков наркотиков, поэтому за ними полицаи особо усердно следят. Лучше вообще класть за городом.
== Публичные архивы ==
* [https://drive.google.com/drive/u/1/folders/1LvTi5oGSHAHH1x03sDNfOpCfPAhxmKBb Движение «Весна»]
* [https://drive.google.com/drive/u/1/folders/1itp5TQnps_MP12sU0rWSagryoYi9MUyB Дочери Сиф]
* [https://drive.google.com/drive/u/1/folders/1yyAPv_vCuL96DTwpwb6BV0mZsZu71Sft Медиа Партизаны]
* [https://drive.google.com/drive/u/1/folders/1x9o10NpwfRoyy09R1_r_XeV0fSHlDQWZ Социалистическая Альтернатива]
[[Категория:Виды агитации]]
6c9d01f03020b87c35a7d1afaabd24dee7b76287
Категория:Виды агитации
14
25
33
2022-07-19T14:46:21Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Стикер
0
26
34
2022-07-19T14:49:13Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Стикер''' (наклейка) — небольшой листок бумаги с клейким слоем. Обычно содержит изображение с несколькими словами или ссылкой.
== Изготовление ==
Выгоднее всего печатать рулоном, но не все типографии оказывают такие услуги.
Можно печатать стикеры дома — для этого нужно только купить бумагу-самоклейку в любом интернет-магазине.
Если возможности печатать совсем нет, можно рисовать стикеры от руки поверх ценников и этикеток (также продаются в интернет-магазинах).
== Расклейка ==
Преимущество стикеров в том, что их можно наклеить быстро и незаметно. Но не стоит расслабляться — всегда нужно исходить из того, будто вы постоянно находитесь под наблюдением камер.
Скорее всего, ваша бумага исчерчена линиями. Согните её, чтобы отделить клейкий слой.
== Правила безопасности ==
''См. [[Листовка#Правила безопасности]].''
== Публичные архивы ==
* [https://drive.google.com/drive/u/1/folders/1Du-lhbAiVFp6nM5BhOfF9tqrP40tCwee Стикеры] от @verdammt_bast
* [https://drive.google.com/drive/u/1/folders/1kw6JAsitnT7tn_NBik94IYR88TCX9GCp Движение «Весна»]
* [https://time-citipati-5f4.notion.site/de0908aa8827479aae94784816320be8 Студенческое Антивоенное Движение]
* [https://nowar72.info/Стикеры.pdf Тюменское движение #НЕТВОЙНЕ]
[[Категория:Виды агитации]]
8da8142f49cd36587bfbfc7ffda4d905686f1472
Наклейка
0
27
35
2022-07-19T14:49:41Z
CyberTailor
2
Перенаправление на [[Стикер]]
wikitext
text/x-wiki
#перенаправление [[Стикер]]
110ae5663c2379322987214f23a9f67dd6c155b6
Категория:Активистские медиа
14
28
37
2022-07-19T15:30:04Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
Данная категория содержит медиапроекты, направленные на вовлечённых в активизм людей.
14c2a53ea1470f414c3f3aa14f62ff5922138701
Шаблон:Медиа
10
29
38
2022-07-19T15:36:27Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Год"><label>Год основания</label></data>
<data source="Идеология"><label>Идеология</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Сайт</label></data>
<data source="Твиттер"><label>Twitter</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Активистские медиа]]}}<noinclude>{{Documentation}}</noinclude>
a4d1b9e5a8b1cfd6d44394c5298143ab62468e53
41
38
2022-07-19T16:00:55Z
CyberTailor
2
Основатели и лидеры
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Год"><label>Год основания</label></data>
<data source="Основатель"><label>Основатели</label><data>
<data source="Лидер"><label>Лидеры</label><data>
<data source="Идеология"><label>Идеология</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Сайт</label></data>
<data source="Твиттер"><label>Twitter</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Активистские медиа]]}}<noinclude>{{doc}}</noinclude>
04ef7a1c06ba0f986d607914445fadd9ca893483
42
41
2022-07-19T16:15:14Z
CyberTailor
2
фикс
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Год"><label>Год основания</label></data>
<data source="Основатель"><label>Основатели</label></data>
<data source="Лидер"><label>Лидеры</label></data>
<data source="Идеология"><label>Идеология</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Сайт</label></data>
<data source="Твиттер"><label>Twitter</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Активистские медиа]]}}<noinclude>{{doc}}</noinclude>
e8a682f6ef645a7674a335b72a9c4685b8f3024f
Шаблон:Твиттер
10
30
39
2022-07-19T15:38:56Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
[https://twitter.com/{{{1}}} @{{{1}}}]<noinclude>{{doc}}</noinclude>
c475421e6b1e7c00826ef9da0a6aeab4d607643c
Антивоенный Больничный
0
31
40
2022-07-19T15:50:35Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{Медиа
|Лого=Image:Stranabolna_logo.png
|Год=2022
|Твиттер={{Твиттер|stranabolna}}
|Канал={{Канал|stranabolna}}
}}
'''Антивоенный Больничный''' — медиа, появившееся из инициативы брать дистанционный больничный (такая возможность существовала до 15 марта 2022 года). Основатели и активные участники неизвестны.
В настоящее время публикуют полезные инструкции и ресурсы для активистов, а также ежедневные сводки происшествий.
e5dc0698ab1d2eb4dd976f71a30586c5569adf84
Медиа Партизаны
0
32
43
2022-07-19T16:16:34Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{Медиа
|Лого=Mpartisans_logo.png
|Год=2022
|Основатель=[[Ольга Демидова]]<ref>{{cite web|url=https://te-st.ru/2022/07/06/media-partisans/|title=Не молчать: как и за что сражаются «Медиа Партизаны»|date=2022-07-06}}</ref>
|Сайт=https://www.mediapartisans.org/
|Канал={{Канал|mpartisans}}
}}
'''Медиа Партизаны''' — проект, объединяющий самых разных антивоенных активистов.
== Проекты ==
=== «Голос народного творчества» ===
Дизайнеры могут поделиться своими работами с активистским сообществом через [[https://t.me/mpartisans_bot бота]]. Ознакомиться с ними можно на соответствующем [https://www.mediapartisans.org/posters разделе сайта].
=== Бот «Храбрые партизаны» ===
В апреле 2022 года был запущен [[https://t.me/brave_partizan_bot бот]], позволяющий освоиться в антивоенном активизме.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/mediapartisanschat Открытый чат #нетвойне]
500effbb4834615cea284d109c2f6555a5b2ea4f
44
43
2022-07-19T16:17:40Z
CyberTailor
2
фикс ссылок
wikitext
text/x-wiki
{{Медиа
|Лого=Mpartisans_logo.png
|Год=2022
|Основатель=[[Ольга Демидова]]<ref>{{cite web|url=https://te-st.ru/2022/07/06/media-partisans/|title=Не молчать: как и за что сражаются «Медиа Партизаны»|date=2022-07-06}}</ref>
|Сайт=https://www.mediapartisans.org/
|Канал={{Канал|mpartisans}}
}}
'''Медиа Партизаны''' — проект, объединяющий самых разных антивоенных активистов.
== Проекты ==
=== «Голос народного творчества» ===
Дизайнеры могут поделиться своими работами с активистским сообществом через [https://t.me/mpartisans_bot бота]. Ознакомиться с ними можно на соответствующем [https://www.mediapartisans.org/posters разделе сайта].
=== Бот «Храбрые партизаны» ===
В апреле 2022 года был запущен [https://t.me/brave_partizan_bot бот], позволяющий освоиться в антивоенном активизме.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/mediapartisanschat Открытый чат #нетвойне]
4a300f99683f613f1113a041545b70f302f3887a
Категория:Политзаключённые
14
33
46
2022-07-19T16:46:39Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
Данная категория содержит список персон, которые подверглись уголовному преследованию за антивоенный активизм.
c0131cb1a830e3ee8714a243f9afe8d2f1f27ee2
Шаблон:Политзек
10
34
47
2022-07-19T16:48:49Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Фото" />
<title source="ФИО"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Город"><label>Город</label></data>
<data source="Деятельность"><label>Род деятельности</label></data>
</group>
<group>
<header>Уголовное дело</header>
<data source="Статья"><label>Статья</label></data>
<data source="Следователь"><label>Следователь</label></data>
</group>
<group>
<header>Контактная информация</header>
<data source="ДатаРождения"><label>Дата рождения</label></data>
<data source="Регион"><label>Регион</label></data>
<data source="Учреждение"><label>Учреждение</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Политзаключённые]]}}<noinclude>{{doc}}</noinclude>
2934c312c3dd34102152d9e5a7211231d6340e7d
48
47
2022-07-19T17:04:21Z
CyberTailor
2
параметр Адвокат
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Фото" />
<title source="ФИО"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Город"><label>Город</label></data>
<data source="Деятельность"><label>Род деятельности</label></data>
</group>
<group>
<header>Уголовное дело</header>
<data source="Статья"><label>Статья</label></data>
<data source="Следователь"><label>Следователь</label></data>
<data source="Адвокат"><label>Адвокат</label></data>
</group>
<group>
<header>Контактная информация</header>
<data source="ДатаРождения"><label>Дата рождения</label></data>
<data source="Регион"><label>Регион</label></data>
<data source="Учреждение"><label>Учреждение</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Политзаключённые]]}}<noinclude>{{doc}}</noinclude>
76dff97a0205ec140fc010f80c661512e2b7bfee
Мартюшев, Кирилл Игоревич
0
35
49
2022-07-19T17:09:21Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{Политзек
|Город=Тюмень
|Деятельность=студент
|Статья=280, часть 2
|Следователь=Анатолий Сухарев
|Адвокат=Павел Руснаков
|ДатаРождения=11.04.1999
|Регион=Тюменская область
|Учреждение=СИЗО-1 Тюмень
}}
'''Кирилл Игоревич Мартюшев''' — политзаключённый, активист [[Тюменское движение НЕТВОЙНЕ|Тюменского движения #НЕТВОЙНЕ]].
== Личная жизнь ==
Находясь в СИЗО, сделал предложение своей девушке.
== Ссылки ==
* [https://taplink.cc/freekirill Сайт «Свободу Кириллу Мартюшеву!»]
4b5f9fc40bd39107c5eefeaeb8ec1f9e46b48692
Кирилл Мартюшев
0
36
50
2022-07-19T17:10:16Z
CyberTailor
2
Перенаправление на [[Мартюшев, Кирилл Игоревич]]
wikitext
text/x-wiki
#перенаправление [[Мартюшев, Кирилл Игоревич]]
3ef87ffab8e684f5e22d9cbdcd99268a40881508
Мартюшев
0
37
51
2022-07-19T17:10:16Z
CyberTailor
2
Перенаправление на [[Мартюшев, Кирилл Игоревич]]
wikitext
text/x-wiki
#перенаправление [[Мартюшев, Кирилл Игоревич]]
3ef87ffab8e684f5e22d9cbdcd99268a40881508
Шаблон:Медиа
10
29
52
42
2022-07-19T17:18:13Z
CyberTailor
2
параметр Инстаграм
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Год"><label>Год основания</label></data>
<data source="Основатель"><label>Основатели</label></data>
<data source="Лидер"><label>Лидеры</label></data>
<data source="Идеология"><label>Идеология</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Сайт</label></data>
<data source="Твиттер"><label>Twitter</label></data>
<data source="Инстаграм"><label>Instagram ''(соцсеть, запрещённая в РФ)''</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Активистские медиа]]}}<noinclude>{{doc}}</noinclude>
ed0807736c4ebd404d89429228d07e2c4574544e
Шаблон:Инстаграм
10
38
53
2022-07-19T17:20:00Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
[https://bibliogram.art/u/{{{1}}} @{{{1}}}]<noinclude>{{doc}}</noinclude>
f0f255c9886dae593e8db8f1ed85dc0f11adf1fd
Антивоенный Больничный
0
31
54
40
2022-07-19T17:22:34Z
CyberTailor
2
инста
wikitext
text/x-wiki
{{Медиа
|Лого=Image:Stranabolna_logo.png
|Год=2022
|Твиттер={{Твиттер|stranabolna}}
|Инстаграм={{Инстаграм|antivoenny_bolnichny}}
|Канал={{Канал|stranabolna}}
}}
'''Антивоенный Больничный''' — медиа, появившееся из инициативы брать дистанционный больничный (такая возможность существовала до 15 марта 2022 года). Основатели и активные участники неизвестны.
В настоящее время публикуют полезные инструкции и ресурсы для активистов, а также ежедневные сводки происшествий.
75f4132f0e05b8bc5cc7f3c481c90434f0a613ef
Медиа Партизаны
0
32
55
44
2022-07-19T17:23:19Z
CyberTailor
2
инста
wikitext
text/x-wiki
{{Медиа
|Лого=Mpartisans_logo.png
|Год=2022
|Основатель=[[Ольга Демидова]]<ref>{{cite web|url=https://te-st.ru/2022/07/06/media-partisans/|title=Не молчать: как и за что сражаются «Медиа Партизаны»|date=2022-07-06}}</ref>
|Сайт=https://www.mediapartisans.org/
|Инстаграм={{Инстаграм|media_partisans}}
|Канал={{Канал|mpartisans}}
}}
'''Медиа Партизаны''' — проект, объединяющий самых разных антивоенных активистов.
== Проекты ==
=== «Голос народного творчества» ===
Дизайнеры могут поделиться своими работами с активистским сообществом через [https://t.me/mpartisans_bot бота]. Ознакомиться с ними можно на соответствующем [https://www.mediapartisans.org/posters разделе сайта].
=== Бот «Храбрые партизаны» ===
В апреле 2022 года был запущен [https://t.me/brave_partizan_bot бот], позволяющий освоиться в антивоенном активизме.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/mediapartisanschat Открытый чат #нетвойне]
bed8f4277417dedf02b6e85e717d32bbbf10261d
Заглавная страница
0
2
56
45
2022-07-19T17:37:20Z
CyberTailor
2
/* Агитация */ Зелёная лента
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Медиапроекты ==
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
4f25257bea2f835fe38da8ff6856dcc591127859
67
56
2022-07-19T18:48:09Z
CyberTailor
2
Раздел "Студенческие организации"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
ddc1174214cbb90c98d051c8f19396303b116c03
71
67
2022-07-19T19:08:31Z
CyberTailor
2
Раздел "Протест"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
ecd5698ec24490482b48fd55af521f5727bb837c
94
71
2022-07-20T11:48:14Z
CyberTailor
2
/* Медиапроекты */ медиа "Получится"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
* Медиа «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
b4f9a4c4559c2a9402b7626a482e5c58ccb52b36
95
94
2022-07-20T11:52:53Z
CyberTailor
2
/* Медиапроекты */ Antiwarriors
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Antiwarriors]]
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
* Медиа «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
86dd1d46124b742e8965f0c8ad04072f0a9060b5
101
95
2022-07-20T12:32:56Z
CyberTailor
2
Раздел "Угрозы"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Antiwarriors]]
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
* Медиа «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
10af101b88245cca8d43e5732144d823f528152f
Зелёная лента
0
39
57
2022-07-19T17:44:57Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Зелёная лента''' — символ мирного протеста, независимо предложенный разными активистами.
Приобрела популярность благодаря медиа «[[Зелёная лента — символ мирного протеста]]».
== Покупка ==
Ленты продаются в магазинах тканей, а также в магазинах праздничных товаров.
[[Категория:Виды протеста]]
112b0b4da89d179e017ec19633abcd11857807dd
58
57
2022-07-19T17:45:29Z
CyberTailor
2
категория
wikitext
text/x-wiki
'''Зелёная лента''' — символ мирного протеста, независимо предложенный разными активистами.
Приобрела популярность благодаря медиа «[[Зелёная лента — символ мирного протеста]]».
== Покупка ==
Ленты продаются в магазинах тканей, а также в магазинах праздничных товаров.
[[Категория:Виды агитации]]
4c0408d00f04778d0d435562ece82b4bc6d23949
Надпись
0
40
59
2022-07-19T18:03:11Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Надпись''' — текст или рисунок, который наносится непосредственно на какую-либо поверхность от руки.
== Нанесение ==
Для надписи подойдут перманентный маркер или мелки.
== Правила безопасности ==
# Не попадайтесь на камеры (которые есть в лифтах, магазинах, общественном транспорте), ведь процесс написания надписи очень заметный.
# Убедитесь, что вас никто не сможет сдать или прервать.
== Удачные места ==
* Остановки общественного транспорта (без камер)
* Трансформаторные будки
== Простые рисунки ==
* [[wp:ru:Голубка Пикассо|Голубка Пикассо]]
* [[wp:ru:Пацифик|Пафицифик]]
[[Категория:Виды агитации]]
c433366061b8a9a4d9de426a02d02c58b016a4a9
60
59
2022-07-19T18:03:46Z
CyberTailor
2
/* Простые рисунки */ ссылки
wikitext
text/x-wiki
'''Надпись''' — текст или рисунок, который наносится непосредственно на какую-либо поверхность от руки.
== Нанесение ==
Для надписи подойдут перманентный маркер или мелки.
== Правила безопасности ==
# Не попадайтесь на камеры (которые есть в лифтах, магазинах, общественном транспорте), ведь процесс написания надписи очень заметный.
# Убедитесь, что вас никто не сможет сдать или прервать.
== Удачные места ==
* Остановки общественного транспорта (без камер)
* Трансформаторные будки
== Простые рисунки ==
* [[wikipedia:ru:Голубка Пикассо|Голубка Пикассо]]
* [[wikipedia:ru:Пацифик|Пафицифик]]
[[Категория:Виды агитации]]
0e8fd1d640e1bbe4e45c5c66f9745b52a66df13d
61
60
2022-07-19T18:04:33Z
CyberTailor
2
/* Простые рисунки */ очепятка
wikitext
text/x-wiki
'''Надпись''' — текст или рисунок, который наносится непосредственно на какую-либо поверхность от руки.
== Нанесение ==
Для надписи подойдут перманентный маркер или мелки.
== Правила безопасности ==
# Не попадайтесь на камеры (которые есть в лифтах, магазинах, общественном транспорте), ведь процесс написания надписи очень заметный.
# Убедитесь, что вас никто не сможет сдать или прервать.
== Удачные места ==
* Остановки общественного транспорта (без камер)
* Трансформаторные будки
== Простые рисунки ==
* [[wikipedia:ru:Голубка Пикассо|Голубка Пикассо]]
* [[wikipedia:ru:Пацифик|Пацифик]]
[[Категория:Виды агитации]]
13ac8f3ab4168edf3da655daf239cd63860a9b8e
97
61
2022-07-20T12:11:08Z
CyberTailor
2
/* Правила безопасности */ ссылка на камеры
wikitext
text/x-wiki
'''Надпись''' — текст или рисунок, который наносится непосредственно на какую-либо поверхность от руки.
== Нанесение ==
Для надписи подойдут перманентный маркер или мелки.
== Правила безопасности ==
# Не попадайтесь на [[камера|камеры]] (которые есть в лифтах, магазинах, общественном транспорте), ведь процесс написания надписи очень заметный.
# Убедитесь, что вас никто не сможет сдать или прервать.
== Удачные места ==
* Остановки общественного транспорта (без камер)
* Трансформаторные будки
== Простые рисунки ==
* [[wikipedia:ru:Голубка Пикассо|Голубка Пикассо]]
* [[wikipedia:ru:Пацифик|Пацифик]]
[[Категория:Виды агитации]]
2cd889ff88cf3f64e416b7c29c95a756a8a19517
Категория:Региональные антивоенные организации
14
3
62
3
2022-07-19T18:17:53Z
CyberTailor
2
родительская категория
wikitext
text/x-wiki
[[Категория:Антивоенные организации]]
f18c2d0f7b47736fce192be37b329e6c9d2c1d53
Категория:Антивоенные организации
14
41
63
2022-07-19T18:18:35Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Категория:Студенческие антивоенные организации
14
42
64
2022-07-19T18:19:36Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
[[Категория:Антивоенные организации]]
f18c2d0f7b47736fce192be37b329e6c9d2c1d53
Шаблон:СтудОрг
10
43
65
2022-07-19T18:23:24Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Университет"><label>Университет</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
<data source="Численность"><label>Число участников</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Вебсайт</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Студенческие антивоенные организации]]}}<noinclude>{{Documentation}}</noinclude>
1e3e219969633b3efe6160e415132686945a2916
68
65
2022-07-19T18:50:39Z
CyberTailor
2
параметр Инстаграм
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Университет"><label>Университет</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
<data source="Численность"><label>Число участников</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Вебсайт</label></data>
<data source="Инстаграм"><label>Instagram ''(соцсеть, запрещённая в РФ)''</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Студенческие антивоенные организации]]}}<noinclude>{{Documentation}}</noinclude>
e1dfd5b030ff5b40318436fdcf5996cf6002908b
81
68
2022-07-19T19:56:45Z
CyberTailor
2
Шаблон doc
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Университет"><label>Университет</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
<data source="Численность"><label>Число участников</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Вебсайт</label></data>
<data source="Инстаграм"><label>Instagram ''(соцсеть, запрещённая в РФ)''</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Студенческие антивоенные организации]]}}<noinclude>{{doc}}</noinclude>
b64e9a819976bf43137e434752096062aff95db7
Инициативная группа ТюмГУ
0
44
66
2022-07-19T18:43:18Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{СтудОрг
|Лого=Image:IG UTMN logo.svg
|Университет=[[wikipedia:ru:ТюмГУ|ТюмГУ]]
|Численность=10
|Сайт=https://strike.sysrq.in/utmn/
|Канал={{Канал|ig_utmn}}
}}
'''Инициативная группа ТюмГУ''' — объединение подписантов открытого антивоенного письма в Тюменском государственном университете.
== История ==
Группа не провела ли одной из запланированных акций, но тем не менее столкнулась с давлением со стороны администрации<ref>{{cite web|url=https://news.doxajournal.ru/novosti/vuzy-okazyvayut-davlenie-na-studentov-iz-za-vojny-s-ukrainoj-prodolzhenie-hroniki/|title=Вузы оказывают давление на студентов из-за войны с Украиной: продолжение хроники|date=2022-04-14}}</ref>.
На момент написания правки неактивна.
== Акции ==
=== Маски с надписями и зелёные ленты ===
Акция не нашла отклика у студентов.
=== Предупредительная забастовка ===
Должна была состояться 9 марта. Нехватка времени для агитации, а также общая пассивность не дали ей состояться.
=== Мастер-класс по обходу блокировок Рунета ===
Должен был состояться 30 марта 2022 года, по территории кампуса был расклеен анонс. Администрация вуза не согласовала использование коворкинга. Это и ужасные организаторские навыки стали причиной срыва мероприятия.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://strike.sysrq.in/Визитки.pdf Визитки] иницативной группы.
7ae64a3d7e5c42e9969b43db55b28b02f5470cb7
Студенческое антивоенное движение
0
45
69
2022-07-19T19:00:59Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{СтудОрг
|Сайт=https://time-citipati-5f4.notion.site/de0908aa8827479aae94784816320be8
|Инстаграм={{Инстаграм|studentsvswar}}
|Канал={{Канал|antiwarstudents}}
}}
'''Студенческое антивоенное движение''' (ранее ''«Студенты против войны»'') ― анонимная и децентрализованная студенческая антивоенная организация.
== Кампании ==
=== «Ректор, отзови подпись!» ===
Кампания возникла в ответ на публикацию [https://rsr-online.ru/news/2022/3/4/obrashenie-rossijskogo-soyuza-rektorov/ открытого письма] Российского Союза Ректоров, поддержавшего военные действия на территории Украины.
На момент написания правки ни один ректор не отозвал свою подпись.
== Ссылки ==
* [https://posle.media/?p=696 Транскрипт круглого стола студенческих инициатив].
4aa21ebb2948c74789939c9fe5d659ef4a64d549
Студенты против войны
0
46
70
2022-07-19T19:02:40Z
CyberTailor
2
Перенаправление на [[Студенческое антивоенное движение]]
wikitext
text/x-wiki
#перенаправление [[Студенческое антивоенное движение]]
ea12439dc79aeffd483d2ef41be10abad0920ff3
Модуль:Documentation
828
47
72
2022-07-19T19:17:55Z
CyberTailor
2
import module
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
return ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
-- 'documentation-toolbar'
return '<span class="' .. message('toolbar-class') .. '">('
.. table.concat(ret, ' | ') .. ')</span>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Entry points
----------------------------------------------------------------------------
function p.nonexistent(frame)
if mw.title.getCurrentTitle().subpageText == 'testcases' then
return frame:expandTemplate{title = 'module test cases notice'}
else
return p.main(frame)
end
end
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
:tag('div')
-- 'documentation-container'
:addClass(message('container'))
:attr('role', 'complementary')
:attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil)
:attr('aria-label', args.heading == '' and 'Documentation' or nil)
:newline()
:tag('div')
-- 'documentation'
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
-- 'documentation-clear'
:addClass(message('clear'))
:done()
:newline()
:done()
:wikitext(p._endBox(args, env))
:done()
:wikitext(p.addTrackingCategories(env))
-- 'Module:Documentation/styles.css'
return mw.getCurrentFrame():extensionTag (
'templatestyles', '', {src=cfg['templatestyles']
}) .. tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title
-- objects and other namespace- or path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the
-- same as the subject namespace. However, pages in the Article, File,
-- MediaWiki or Category namespaces must have their /doc, /sandbox and
-- /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{ page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle
and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if compareUrl then
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
else
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
omargs.text = text .. makeCategoryLink(message('sandbox-category'))
-- 'documentation-clear'
return '<div class="' .. message('clear') .. '"></div>'
.. require('Module:Message box').main('ombox', omargs)
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- The page is edit-protected.
return require('Module:Protection banner')._main{
message('protection-reason-edit'), small = true
}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
return require('Module:Protection banner')._main{
action = 'move', small = true
}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content or args[1] then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create][purge] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink, purgeLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
else
-- 'documentation-heading'
data.headingClass = message('main-div-heading-class')
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
-- 'mw-editsection-like plainlinks'
data.linksClass = message('start-box-link-classes')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
-- 'documentation-startbox'
:addClass(message('start-box-class'))
:newline()
:tag('span')
:addClass(data.headingClass)
:attr('id', 'documentation-heading')
:cssText(data.headingStyleText)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the link box.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
end
end
local box = mw.html.create('div')
-- 'documentation-metadata'
box:attr('role', 'note')
:addClass(message('end-box-class'))
-- 'plainlinks'
:addClass(message('end-box-plainlinks'))
:wikitext(text)
:done()
return '\n' .. tostring(box)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Help:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
95ab9de543475e37250dc94558a5508a3c7c3dfc
Модуль:Documentation/config
828
48
73
2022-07-19T19:19:02Z
CyberTailor
2
import module
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Protection template configuration
----------------------------------------------------------------------------------------------------
-- cfg['protection-reason-edit']
-- The protection reason for edit-protected templates to pass to
-- [[Module:Protection banner]].
cfg['protection-reason-edit'] = 'template'
--[[
----------------------------------------------------------------------------------------------------
-- Sandbox notice configuration
--
-- On sandbox pages the module can display a template notifying users that the current page is a
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
-- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
-- messages that the notices contains.
----------------------------------------------------------------------------------------------------
--]]
-- cfg['sandbox-notice-image']
-- The image displayed in the sandbox notice.
cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]'
--[[
-- cfg['sandbox-notice-pagetype-template']
-- cfg['sandbox-notice-pagetype-module']
-- cfg['sandbox-notice-pagetype-other']
-- The page type of the sandbox page. The message that is displayed depends on the current subject
-- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
-- cfg['sandbox-notice-diff-blurb'].
--]]
cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page'
cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page'
cfg['sandbox-notice-pagetype-other'] = 'sandbox page'
--[[
-- cfg['sandbox-notice-blurb']
-- cfg['sandbox-notice-diff-blurb']
-- cfg['sandbox-notice-diff-display']
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
-- type, which is either cfg['sandbox-notice-pagetype-template'],
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
-- the sandbox and the main template. The display value of the diff link is set by
-- cfg['sandbox-notice-compare-link-display'].
--]]
cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.'
cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).'
cfg['sandbox-notice-compare-link-display'] = 'diff'
--[[
-- cfg['sandbox-notice-testcases-blurb']
-- cfg['sandbox-notice-testcases-link-display']
-- cfg['sandbox-notice-testcases-run-blurb']
-- cfg['sandbox-notice-testcases-run-link-display']
-- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.
-- cfg['sandbox-notice-testcases-link-display'] is the display value for that link.
-- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test
-- cases page, and $2 is a link to the page to run it.
-- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test
-- cases.
--]]
cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.'
cfg['sandbox-notice-testcases-link-display'] = 'test cases'
cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).'
cfg['sandbox-notice-testcases-run-link-display'] = 'run'
-- cfg['sandbox-category']
-- A category to add to all template sandboxes.
cfg['sandbox-category'] = 'Template sandboxes'
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[wikipedia:Wikipedia:Template documentation|documentation]] is [[wikipedia:Help:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[wikipedia:Wikipedia:Lua|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['templatestyles']
-- The name of the TemplateStyles page where CSS is kept.
-- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed.
cfg['templatestyles'] = 'Module:Documentation/styles.css'
-- cfg['container']
-- Class which can be used to set flex or grid CSS on the
-- two child divs documentation and documentation-metadata
cfg['container'] = 'documentation-container'
-- cfg['main-div-classes']
-- Classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'documentation'
-- cfg['main-div-heading-class']
-- Class for the main heading for templates and modules and assoc. talk spaces
cfg['main-div-heading-class'] = 'documentation-heading'
-- cfg['start-box-class']
-- Class for the start box
cfg['start-box-class'] = 'documentation-startbox'
-- cfg['start-box-link-classes']
-- Classes used for the [view][edit][history] or [create] links in the start box.
-- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]]
cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks'
-- cfg['end-box-class']
-- Class for the end box.
cfg['end-box-class'] = 'documentation-metadata'
-- cfg['end-box-plainlinks']
-- Plainlinks
cfg['end-box-plainlinks'] = 'plainlinks'
-- cfg['toolbar-class']
-- Class added for toolbar links.
cfg['toolbar-class'] = 'documentation-toolbar'
-- cfg['clear']
-- Just used to clear things.
cfg['clear'] = 'documentation-clear'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
81c27f1dccc0f0b9b5e83cc77a1de67f87911837
Шаблон:Doc
10
49
74
2022-07-19T19:20:04Z
CyberTailor
2
import template
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>
<!-- Add categories to the /doc subpage -->
</noinclude>
9e62b964e96c4e3d478edecbfcb3c0338ae8a276
Модуль:Documentation/styles.css
828
50
75
2022-07-19T19:21:17Z
CyberTailor
2
import
sanitized-css
text/css
/* {{pp|small=yes}} */
.documentation,
.documentation-metadata {
border: 1px solid #a2a9b1;
background-color: #ecfcf4;
clear: both;
}
.documentation {
margin: 1em 0 0 0;
padding: 1em;
}
.documentation-metadata {
margin: 0.2em 0; /* same margin left-right as .documentation */
font-style: italic;
padding: 0.4em 1em; /* same padding left-right as .documentation */
}
.documentation-startbox {
padding-bottom: 3px;
border-bottom: 1px solid #aaa;
margin-bottom: 1ex;
}
.documentation-heading {
font-weight: bold;
font-size: 125%;
}
.documentation-clear { /* Don't want things to stick out where they shouldn't. */
clear: both;
}
.documentation-toolbar {
font-style: normal;
font-size: 85%;
}
ce0e629c92e3d825ab9fd927fe6cc37d9117b6cb
Шаблон:Documentation
10
51
76
2022-07-19T19:23:41Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
{{raw:templatewiki:{{PAGENAME}}/doc}}
eb507d8c2c99de081c88c85487f5bbbbdefa84bb
77
76
2022-07-19T19:24:53Z
CyberTailor
2
includeonly
wikitext
text/x-wiki
<includeonly>{{raw:templatewiki:{{PAGENAME}}/doc}}</includeonly>
167b7aa2284ded85a5889fcedc68bc43471a8306
Шаблон:Политзек/doc
10
52
78
2022-07-19T19:51:01Z
CyberTailor
2
Документация
wikitext
text/x-wiki
== Образцы для копирования ==
'''Полный вариант'''
<nowiki>{{Политзек |Фото= |ФИО= |Город= |Деятельность= |Статья= |Следователь= |Адвокат= |ДатаРождения= |Регион= |Учреждение=}}</nowiki>
'''Полный вариант, многострочный'''
<nowiki>{{Политзек
|Фото =
|ФИО =
|Город =
|Деятельность =
|Статья =
|Следователь =
|Адвокат =
|ДатаРождения =
|Регион =
|Учреждение =
}}</nowiki>
25933b31c0a517b4b12b47b7da6052eed1cef27a
Шаблон:РегОрг
10
4
79
5
2022-07-19T19:53:06Z
CyberTailor
2
Шаблон doc
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Регион"><label>Регион</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Сайт</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Региональные антивоенные организации]]}}<noinclude>{{doc}}</noinclude>
d1113ddc0d80afb2755764e088910742f1d50a6e
Шаблон:РегОрг/doc
10
53
80
2022-07-19T19:55:27Z
CyberTailor
2
Документация
wikitext
text/x-wiki
Шаблон для региональных организаций.
== Образцы для копирования ==
'''Полный вариант'''
<nowiki>{{РегОрг |Лого= |Название= |Регион= |Деятельность= |Сайт= |Канал=}}</nowiki>
'''Полный вариант, многострочный'''
<nowiki>{{РегОрг
|Лого =
|Название =
|Регион =
|Деятельность =
|Сайт =
|Канал =
}}</nowiki>
090160b113595b56084e3a81473f40be6e4a3252
Шаблон:СтудОрг/doc
10
54
82
2022-07-19T19:59:44Z
CyberTailor
2
Документация
wikitext
text/x-wiki
Шаблон для студенческих организаций.
== Образцы для копирования ==
'''Полный вариант'''
<nowiki>{{СтудОрг |Лого= |Название= |Университет= |Деятельность= |Численность= |Сайт= |Инстаграм=| Канал=}}</nowiki>
'''Полный вариант, многострочный'''
<nowiki>{{СтудОрг
|Лого =
|Название =
|Университет =
|Деятельность =
|Численность =
|Сайт =
|Инстаграм =
|Канал =
}}</nowiki>
65c355c778d763525818ab51cce088f29614054b
Шаблон:Медиа/doc
10
55
83
2022-07-19T20:02:44Z
CyberTailor
2
Документация
wikitext
text/x-wiki
Шаблон для медиапроектов.
== Образцы для копирования ==
'''Полный вариант'''
<nowiki>{{Медиа |Лого= |Название= |Год= |Основатель= |Лидер= |Идеология= |Сайт= |Твиттер= |Инстаграм=| Канал=}}</nowiki>
'''Полный вариант, многострочный'''
<nowiki>{{Медиа
|Лого =
|Название =
|Год =
|Основатель =
|Лидер =
|Идеология =
|Сайт =
|Твиттер =
|Инстаграм =
|Канал =
}}</nowiki>
fc88285b66654f691fd9a346bded0dd0a8e51474
Шаблон:Твиттер/doc
10
56
84
2022-07-19T20:06:02Z
CyberTailor
2
Документация
wikitext
text/x-wiki
== Параметры ==
'''<code><nowiki>{{Твиттер|<окончание URL>}}</nowiki></code>''', где:
* <code><окончание URL></code> — строка, добавляемая к ''<nowiki>https://twitter.com/</nowiki>'' при формировании ссылки.
b234aa476b40295ec5a22b0aa54094d80872028b
Шаблон:Канал
10
5
85
6
2022-07-19T20:07:42Z
CyberTailor
2
Шаблон doc
wikitext
text/x-wiki
[https://t.me/{{{1}}} @{{{1}}}]<noinclude>{{doc}}</noinclude>
1ac6dc87624f5bdfa0f40f96a2eb8ee09c7dbce6
Шаблон:Инстаграм/doc
10
57
86
2022-07-19T20:08:36Z
CyberTailor
2
Документация
wikitext
text/x-wiki
== Параметры ==
'''<code><nowiki>{{Инстаграм|<окончание URL>}}</nowiki></code>''', где:
* <code><окончание URL></code> — строка, добавляемая к ''<nowiki>https://bibliogram.art/u/</nowiki>'' при формировании ссылки.
4588fabbfd7d8304986280e1f15a7d0500dffce8
Шаблон:Канал/doc
10
58
87
2022-07-19T20:08:57Z
CyberTailor
2
Документация
wikitext
text/x-wiki
== Параметры ==
'''<code><nowiki>{{Канал|<окончание URL>}}</nowiki></code>''', где:
* <code><окончание URL></code> — строка, добавляемая к ''<nowiki>https://t.me/</nowiki>'' при формировании ссылки.
aee3eeeecbeff2c00983ce3b2bb587e18cbb2343
Антивоенный комитет Кубани
0
23
88
30
2022-07-20T11:15:40Z
CyberTailor
2
Пожертвования
wikitext
text/x-wiki
{{РегОрг
|Регион=Краснодарский край
|Деятельность=
* Расклейка [[листовка|листовок]] и [[стикер]]ов
|Канал={{Канал|navalnyKRD}}
}}
'''Антивоенный комитет Кубани''' — антивоенная организация, созданная сторонниками [[Алексей Навальный|Алексея Навального]].
== Пожертвования ==
Комитет собирает деньги на печать листовок через [bitcoin:bc1q2few9favd33w6swec882kpuy70affs6cld27fv биткоин-кошелёк] и на карту Сбербанка <code>5469 9804 2048 5035</code>.
7dadd656bec8baa8a5a51f8be257ee355cb3e316
Навальный, Алексей Анатольевич
0
59
89
2022-07-20T11:30:39Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{Политзек
|Фото=Файл:Alexei Navalny marching in 2017 (cropped 2).jpg
|Город=Москва
|Статья=
* 128.1, часть 1
* 128.1, часть 2
* 159.4, часть 2
* 159.4, часть 3
* 160, часть 4
* 174.1, часть 2
* 239, часть 2
* 282.1, часть 1
* 297, часть 2
|ДатаРождения=4.6.1976
|Регион=Владимирская область
|Учреждение=ИК-6 Мелехово
}}
== Ссылки ==
* [https://memohrc.org/ru/defendants/navalnyy-aleksey-anatolevich Алексей Навальный] на сайте «Мемориала».
6c659236eb436553b02eeece546920dd73172efd
93
89
2022-07-20T11:35:35Z
CyberTailor
2
ФИО
wikitext
text/x-wiki
{{Политзек
|Фото=Файл:Alexei Navalny marching in 2017 (cropped 2).jpg
|ФИО=Алексей Анатольевич Навальный
|Город=Москва
|Статья=
* 128.1, часть 1
* 128.1, часть 2
* 159.4, часть 2
* 159.4, часть 3
* 160, часть 4
* 174.1, часть 2
* 239, часть 2
* 282.1, часть 1
* 297, часть 2
|ДатаРождения=4.6.1976
|Регион=Владимирская область
|Учреждение=ИК-6 Мелехово
}}
'''Алексей Анатольевич Навальный''' — политзаключённый, оппозиционный политик.
== Ссылки ==
* [https://memohrc.org/ru/defendants/navalnyy-aleksey-anatolevich Алексей Навальный] на сайте «Мемориала».
a68afc1f2fc4dbda540fa8f46a6cdd5e8106bc89
Алексей Навальный
0
60
90
2022-07-20T11:31:11Z
CyberTailor
2
Перенаправление на [[Навальный, Алексей Анатольевич]]
wikitext
text/x-wiki
#перенаправление [[Навальный, Алексей Анатольевич]]
990cd23cc16d217ce7c25bd669990ddb236f2a85
Навальный
0
61
91
2022-07-20T11:31:11Z
CyberTailor
2
Перенаправление на [[Навальный, Алексей Анатольевич]]
wikitext
text/x-wiki
#перенаправление [[Навальный, Алексей Анатольевич]]
990cd23cc16d217ce7c25bd669990ddb236f2a85
Мартюшев, Кирилл Игоревич
0
35
92
49
2022-07-20T11:33:57Z
CyberTailor
2
ФИО
wikitext
text/x-wiki
{{Политзек
|ФИО=Кирилл Игоревич Мартюшев
|Город=Тюмень
|Деятельность=студент
|Статья=280, часть 2
|Следователь=Анатолий Сухарев
|Адвокат=Павел Руснаков
|ДатаРождения=11.04.1999
|Регион=Тюменская область
|Учреждение=СИЗО-1 Тюмень
}}
'''Кирилл Игоревич Мартюшев''' — политзаключённый, активист [[Тюменское движение НЕТВОЙНЕ|Тюменского движения #НЕТВОЙНЕ]].
== Личная жизнь ==
Находясь в СИЗО, сделал предложение своей девушке.
== Ссылки ==
* [https://taplink.cc/freekirill Сайт «Свободу Кириллу Мартюшеву!»]
68247e8cd7d21041749ef7774ab1897e44d234b8
Листовка
0
24
96
36
2022-07-20T12:10:29Z
CyberTailor
2
/* Правила безопасности */ ссылка на камеры
wikitext
text/x-wiki
'''Листовка''' — относительно крупный лист обычной бумаги с агитационным содержанием, напечатанный или нарисованный от руки.
== Печать ==
Безопаснее всего печатать дома. Идите в типографию только если им полностью доверяете. Если за вами ведётся наружная слежка, вы создаёте для типографии риск обыска — учитывайте и это тоже.
== Расклейка ==
Чтобы наклеить листовку, можно использовать клейстер, клей ПВА, клей-карандаш и двусторонний скотч (по вкусу). Наносить клей ПВА следует буквой ''N''. Двусторонний скотч стоит клеить на листовку заранее, до выхода на расклейку.
Листовки удобнее всего носить в шоппере, но можно и в рюкзаке. Чем быстрее вы всё сделаете, тем меньше вероятность попасться.
Лучшее время для расклейки — поздний вечер и раннее утро, когда темно и малолюдно.
== Правила безопасности ==
# Не выходите на расклейку в одиночку. Всегда кто-то должен стоять на шухере. Если заметите полицию, бегите врассыпную.
# Если вы расклеиваете материалы, носите неприметную одежду. Не ту, которую носите обычно! Также закрывайте лицо и голову, нося маску и кепку. Обязательно. ''И следите за [https://prospectus.surge.sh/ камерами].'' Также надевайте перчатки - лучше подстраховаться от пробивки по отпечаткам.
# Не берите с собой ваш обычный телефон. Возьмите «чистый» мобильник с номером ОВД-Инфо — [tel:+78007070528 8 (800) 707-05-28].
# Если вы хотите сфотографировать результаты трудов своих, сделайте это потом. Сначала сходили расклеить, через какое-то время пошли уже в качестве обычного прохожего и сфотографировали как бы мимоходом. Заодно посмотрите, где их сразу срывают, а где остаются висеть. Фото не храните.
# Не носите с собой много листовок сразу. Только то, что собираетесь сразу расклеить. Попасться с большой партией при себе — плохо.
# Возьмите с собой перцовый баллончик. Он поможет защитить себя от агрессивно настроенных граждан.
# Также не храните запас материалов дома. Если вы печатаете в больших масштабах, обустройте «точку» в месте, которое с вами не свяжут. Добираться туда и обратно нужно также соблюдая меры безопасности — скрывая лицо и путая камеры.
# Не расклеивайте по одним и тем же маршрутам, ''не клейте возле вашего дома'' (иначе там будут рыскать полицаи). Меняйте районы, регулярность и время.
# Если вы передаете материалы другим расклейщикам, а 100% доверия им нет (или по другим причинам боитесь передавать при встрече), можно использовать закладки. Закладки отнимают много сил, но повышают безопасность — особенно, если расклейщики вас не знают.. Тут тоже лучше не покрывать отпечатками материалы и пакеты.
# Если решили действовать так, закладки делайте максимально осторожно. Нельзя попадаться камерам и местным жителям (тем более — ментам). Некоторые места (гаражи, опушки парков) популярны у закладчиков наркотиков, поэтому за ними полицаи особо усердно следят. Лучше вообще класть за городом.
== Публичные архивы ==
* [https://drive.google.com/drive/u/1/folders/1LvTi5oGSHAHH1x03sDNfOpCfPAhxmKBb Движение «Весна»]
* [https://drive.google.com/drive/u/1/folders/1itp5TQnps_MP12sU0rWSagryoYi9MUyB Дочери Сиф]
* [https://drive.google.com/drive/u/1/folders/1yyAPv_vCuL96DTwpwb6BV0mZsZu71Sft Медиа Партизаны]
* [https://drive.google.com/drive/u/1/folders/1x9o10NpwfRoyy09R1_r_XeV0fSHlDQWZ Социалистическая Альтернатива]
[[Категория:Виды агитации]]
f6096094e01e49507da24d2e6623a8e48000a5ea
98
96
2022-07-20T12:11:51Z
CyberTailor
2
/* Правила безопасности */ внутренняя ссылка на камеры
wikitext
text/x-wiki
'''Листовка''' — относительно крупный лист обычной бумаги с агитационным содержанием, напечатанный или нарисованный от руки.
== Печать ==
Безопаснее всего печатать дома. Идите в типографию только если им полностью доверяете. Если за вами ведётся наружная слежка, вы создаёте для типографии риск обыска — учитывайте и это тоже.
== Расклейка ==
Чтобы наклеить листовку, можно использовать клейстер, клей ПВА, клей-карандаш и двусторонний скотч (по вкусу). Наносить клей ПВА следует буквой ''N''. Двусторонний скотч стоит клеить на листовку заранее, до выхода на расклейку.
Листовки удобнее всего носить в шоппере, но можно и в рюкзаке. Чем быстрее вы всё сделаете, тем меньше вероятность попасться.
Лучшее время для расклейки — поздний вечер и раннее утро, когда темно и малолюдно.
== Правила безопасности ==
# Не выходите на расклейку в одиночку. Всегда кто-то должен стоять на шухере. Если заметите полицию, бегите врассыпную.
# Если вы расклеиваете материалы, носите неприметную одежду. Не ту, которую носите обычно! Также закрывайте лицо и голову, нося маску и кепку. Обязательно. ''И следите за [[камера]]ми.'' Также надевайте перчатки - лучше подстраховаться от пробивки по отпечаткам.
# Не берите с собой ваш обычный телефон. Возьмите «чистый» мобильник с номером ОВД-Инфо — [tel:+78007070528 8 (800) 707-05-28].
# Если вы хотите сфотографировать результаты трудов своих, сделайте это потом. Сначала сходили расклеить, через какое-то время пошли уже в качестве обычного прохожего и сфотографировали как бы мимоходом. Заодно посмотрите, где их сразу срывают, а где остаются висеть. Фото не храните.
# Не носите с собой много листовок сразу. Только то, что собираетесь сразу расклеить. Попасться с большой партией при себе — плохо.
# Возьмите с собой перцовый баллончик. Он поможет защитить себя от агрессивно настроенных граждан.
# Также не храните запас материалов дома. Если вы печатаете в больших масштабах, обустройте «точку» в месте, которое с вами не свяжут. Добираться туда и обратно нужно также соблюдая меры безопасности — скрывая лицо и путая камеры.
# Не расклеивайте по одним и тем же маршрутам, ''не клейте возле вашего дома'' (иначе там будут рыскать полицаи). Меняйте районы, регулярность и время.
# Если вы передаете материалы другим расклейщикам, а 100% доверия им нет (или по другим причинам боитесь передавать при встрече), можно использовать закладки. Закладки отнимают много сил, но повышают безопасность — особенно, если расклейщики вас не знают.. Тут тоже лучше не покрывать отпечатками материалы и пакеты.
# Если решили действовать так, закладки делайте максимально осторожно. Нельзя попадаться камерам и местным жителям (тем более — ментам). Некоторые места (гаражи, опушки парков) популярны у закладчиков наркотиков, поэтому за ними полицаи особо усердно следят. Лучше вообще класть за городом.
== Публичные архивы ==
* [https://drive.google.com/drive/u/1/folders/1LvTi5oGSHAHH1x03sDNfOpCfPAhxmKBb Движение «Весна»]
* [https://drive.google.com/drive/u/1/folders/1itp5TQnps_MP12sU0rWSagryoYi9MUyB Дочери Сиф]
* [https://drive.google.com/drive/u/1/folders/1yyAPv_vCuL96DTwpwb6BV0mZsZu71Sft Медиа Партизаны]
* [https://drive.google.com/drive/u/1/folders/1x9o10NpwfRoyy09R1_r_XeV0fSHlDQWZ Социалистическая Альтернатива]
[[Категория:Виды агитации]]
7dbc39b9301d0789c78cb2b8eb27c75d85850e45
Категория:Угрозы
14
62
99
2022-07-20T12:28:23Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Камера
0
63
100
2022-07-20T12:29:42Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Камера''' — устройство видеонаблюдения, записями с которого пользуются силовики для выслеживания активистов.
== Обезвреживание ==
Для акции нужна максимально неприметная одежда. Необходимо скрыть все черты, по которым вас могут идентифицировать (лицо, татуировки, родинки).
Чтобы «ослепить» камеру на время, можно посветить в неё лазерной указкой.
Провод камеры можно перекусить<ref>{{cite web|url=https://ru.crimethinc.com/2020/07/14/osliepliaia-tsiklopov-razrushaia-panoptikum-okhota-za-kamierami-v-mieghapolisie|title=Ослепляя Циклопов — Разрушая Паноптикум|date=2020-07-14}}</ref>, а можно испортить объектив с помощью баллончика аэрозольной краски.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://prospectus.surge.sh/ Карта камер Москвы]
[[Категория:Угрозы]]
a8e067bcf30d708e95bb49c22dac56d34c2f80b6
Модуль:Citation/CS1/Suggestions
828
64
102
2022-07-20T12:43:27Z
CyberTailor
2
import module
Scribunto
text/plain
--Please insert new suggestions in alphabetical order
--The form is ['incorrect'] = 'correct',
suggestions = {
['accessmonth'] = 'access-date', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date'
['accesso'] = 'access-date', -- Italian
['accessyear'] = 'access-date', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date'
['address'] = 'location',
['année'] = 'year', -- French
['año'] = 'year',
['año-original'] = 'orig-year',
['añoacceso'] = 'access-date', -- Spanish
['annoaccesso'] = 'access-date', --Italian
['annodiaccesso'] = 'access-date', --Italian
['apellido'] = 'last', -- Spanish
['archiv-datum'] = 'archive-date', -- German
['archive date'] = 'archive-date',
['archiv-url'] = 'archive-url', -- German
['archive url'] = 'archive-url', -- Spanish
['artist'] = 'others',
['auflage'] = 'edition', -- German
['auteur'] = 'author', -- French
['auther'] = 'author',
['author link'] = 'author-link', -- Polish
['author link2'] = 'author2-link', -- Polish
['autor'] = 'authors', -- German (singular and plural)
['autore'] = 'author', -- Italian
['autthor'] = 'author',
['band'] = 'volume', -- German
['chapter_title'] = 'chapter',
['cita'] = 'quote', -- Spanish
['citazione'] = 'quote', -- Italian
['coauthor'] = 'author',
['coauthors'] = 'author',
['coautores'] = 'author', -- Spanish
['coautori'] = 'author', -- Italian
['cognome'] = 'last', -- Italian
['consulté le'] = 'access-date', -- French
['czasopismo'] = 'journal', -- Polish
['data'] = 'date', -- Polish, Italian
['dataarchivio'] = 'archive-date', -- Italian
['data dostępu'] = 'access-date', -- Polish
['datum'] = 'date', -- German
['deadlink'] = 'dead-url',
['distributor'] = 'publisher',
['dnb'] = 'id', -- German (as 'id={{DNB-IDN|...}}') (not yet supported by us directly)
['éditeur'] = 'editor', -- French
['editon'] = 'edition',
['editoin'] = 'edition',
['editorial'] = 'publisher',
['en ligne le'] = 'archive-date', -- French
['encyclopædia'] = 'encyclopedia',
['enlaceautor'] = 'author-link', -- Spanish
['fecha'] = 'date', -- Spanish
['fechaacceso'] = 'access-date', -- Spanish
['fechaarchivo'] = 'archive-date', -- Spanish
['filetype'] = 'format',
['first 1'] = 'first1',
['foramt'] = 'format',
['formato'] = 'format', -- Spanish, Italian, Polish
['frist'] = 'first',
['herausgeber'] = 'editors', -- German (singular and plural)
['idioma'] = 'language', -- Spanish, Italian
['imię'] = 'first', -- Polish
['isbnistformalfalsch'] = 'ignore-isbn-error', -- German
['isnb'] = 'isbn',
['jahr'] = 'year', -- German
['kapitel'] = 'chapter', -- German
-- ['kommentar'] = 'comment', -- German (not yet supported by us)
['lang'] = 'language',
['langauge'] = 'language',
['langue'] = 'language', -- French
['last 1'] = 'last1',
['lieu'] = 'location', -- French
['lingua'] = 'language', -- Italian
['lire en ligne'] = 'url', -- French
['lizenznummer'] = 'id', -- German (as 'id=License ...')
['loaction'] = 'location',
['locatoin'] = 'location',
['lugar'] = 'location', -- Spanish
['miejsce'] = 'location', -- Polish
['miesiąc'] = 'date', -- Polish
['mois'] = 'date', -- French
['monat'] = 'date', -- German
-- ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
['nazwisko'] = 'last', -- Polish
['nespaper'] = 'newspaper',
['newpaper'] = 'newspaper',
['news'] = 'newspaper',
['nom'] = 'last', -- French
['nom1'] = 'last1', -- French
['nombre'] = 'first', -- Spanish
['nome'] = 'first', -- Italian
['nummer'] = 'number', -- German
['obra'] = 'work', -- Spanish
['odpowiedzialność'] = 'agency', -- Polish
['offline'] = 'dead-url', -- German
['online'] = 'url', -- German (not a direct replacement, but can be emulated)
['opublikowany'] = 'agency', -- Polish
['opera'] = 'work', -- Italian
['origdate'] = 'orig-year',
['originaljahr'] = 'orig-year', -- German
['originalort'] = 'location', -- German (if 'ort' is specified at the same time, the latter should be put in 'publication-place')
['originalsprache'] = 'language', -- German
['originaltitel'] = 'title', -- German (if 'originaltitel' is specified, any possible contents of 'title' should be put in 'trans-title')
['ort'] = 'location', -- German
['other'] = 'others',
['oznaczenie'] = 'agency', -- Polish
['pagees'] = 'pages',
['página'] = 'page', -- Spanish, Italian
['páginas'] = 'pages', -- Spanish, Italian
['passage'] = 'pages', -- French
['pagina'] = 'pages', -- Italian
['pagine'] = 'pages', -- Italian
['périodique'] = 'publisher', -- French
['plublisher'] = 'publisher',
['pmcid'] = 'pmc',
['praca'] = 'work', -- Polish
['prénom'] = 'first', -- French
['prénom1'] = 'first1', -- French
['ps'] = 'postscript',
['pub'] = 'publisher',
['pulbication-place'] = 'publication-place',
['reihe'] = 'series', -- German
['retrieved'] = 'access-date',
['rok'] = 'date', -- Polish
['sammelwerk'] = 'work', -- German
['seiten'] = 'pages', -- German
['seria'] = 'series', -- Polish
['série'] = 'work', -- French *RECHECK*
['service'] = 'agency',
['sitioweb'] = 'website', --Spanish
['stron'] = 'page', -- Polish
['strony'] = 'pages', -- Polish
['spalten'] = 'at', -- German (not a direct replacement, but can be emulated)
['sprache'] = 'language', -- German
['suscripción'] = 'subscription', -- Spanish, Polish
['tag'] = 'date', -- German
['tile'] = 'title',
['tite'] = 'title',
['titel'] = 'title', -- German
['titel-p'] = 'title', -- German ('postscript=none' should be added as well)
['titelerg'] = 'contribution', -- German (not a direct replacement, but can be emulated)
['titolo'] = 'title', -- Spanish, Italian
['titre'] = 'title', -- French
['títle'] = 'title',
['título'] = 'title', -- Spanish
['transchapter'] = 'trans-chapter',
['translator'] = 'others',
['transtitle'] = 'trans-title',
['typ'] = 'author-mask', -- German (not a direct replacement, but the only valid argument 'typ=wl' can be emulated using 'author-mask')
['tytuł'] = 'title', -- Polish
['ubicación'] = 'location', -- Spanish
['urlarchivo'] = 'archive-url', -- Spanish
['urlarchivio'] = 'archive-url', -- Italian
['urn'] = 'id', -- German (as 'id={{URN|...}}') (not yet supported by us directly)
['übersetzer'] = 'translator', -- German (singular and plural)
['verlag'] = 'publisher', -- German
['vol'] = 'volume',
['volumen'] = 'volume', -- Spanish
['werk'] = 'work', -- German
['werkerg'] = 'contribution', -- German (not a direct replacement, but can be emulated)
['wkautore'] = 'author-link', -- Italian
['wolumin'] = 'volume', -- Polish
['wydanie'] = 'number', -- Polish
['wydawca'] = 'publisher', -- French
['zaprezentowany'] = 'publisher', -- French
['zdb'] = 'id', -- German (as 'id={{ZDB|...}}') (not yet supported by us directly)
['zitat'] = 'quote', -- German
['zugriff'] = 'access-date', -- German
}
--[[--------------------------< P A T T E R N S >--------------------------------------------------------------
Here we use Lua patterns to make suggestions. The form is ['pattern'] = 'correct',
Lua patterns are not regex though they are similar. The escape character is '%', not '\'. For more information about
lua patterns, see: Extension:Scribunto/Lua_reference_manual#Patterns
Patterns should probably always include the '^' and '$' anchor assertions to prevent a partial match from incorrectly
suggesting the wrong parameter name. For instance, the pattern 'a[utho]+r' matches 'author' in the no-longer-supported
parameter |author-separator= so the code suggests '|author='; the same pattern also matches the no-longer-supported
parameter |separator= (returning 'ator') so again, the code suggests '|author='.
One capture is supported, typically the enumerator from an enumerated parameter (the '6' in |author6=, etc.) The value from the
capture replaces $1 in the 'correct' value.
]]
local patterns = {
['^ac+es+ ?d?a?t?e?$'] = 'access-date',
['^a[utho]+r$'] = 'author',
['^a[utho]+r(%d+)$'] = 'author$1', -- enumerated
['^pu[blish]+ers?$'] = 'publisher',
}
return {suggestions = suggestions, patterns=patterns};
a95c24b1370b3623f16b70f50b9e3b19de678555
Завербованный информатор
0
65
103
2022-07-20T12:45:26Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Завербованный информатор''' — член организации, сотрудничающий с силовиками.
== Известные агенты ==
* Всеволод Осипов<ref>{{cite web|url=https://meduza.io/feature/2022/07/11/puskay-vse-znayut-chto-ya-agent|title=«Пускай все знают, что я — агент»|language=ru|date=2022-07-11}}</ref>
== Примечания ==
{{примечания}}
== Ссылки ==
* «[https://dept.one/ Первый отдел]» — правозащитная организация, оказывающая помощь в том числе завербованным агентам.
683b5cd6f38ec120510e45c422defa0fd41df577
104
103
2022-07-20T12:48:11Z
CyberTailor
2
Категория
wikitext
text/x-wiki
'''Завербованный информатор''' — член организации, сотрудничающий с силовиками.
== Известные агенты ==
* Всеволод Осипов<ref>{{cite web|url=https://meduza.io/feature/2022/07/11/puskay-vse-znayut-chto-ya-agent|title=«Пускай все знают, что я — агент»|language=ru|date=2022-07-11}}</ref>
== См. также ==
* [[Внедрённый агент]]
== Примечания ==
{{примечания}}
== Ссылки ==
* «[https://dept.one/ Первый отдел]» — правозащитная организация, оказывающая помощь в том числе завербованным агентам.
[[Категория:Угрозы]]
61c11e6e00f31195a1ea89c659eb589c3364650f
108
104
2022-07-20T13:20:24Z
CyberTailor
2
Раздел про вербовку
wikitext
text/x-wiki
'''Завербованный информатор''' — член организации, сотрудничающий с силовиками.
== Вербовка ==
Цель вербовки — создание сети информаторов в политических организациях. Полученные сведения спецслужбы используют для подавления деятельности этих организаций.
Предлагая стучать, силовики стараются быть максимально убедительными. Уговоры могут принимать форму:
* прямых угроз («не будешь сотрудничать — будешь сидеть»)
* манипуляций («все твои друзья уже стучат»)
* попыток подружиться («мы не враги, хотим помочь»)
Однако ''силовики частно обманывают,'' и их «помощь» может обернуться большими проблемами. ''Не поддавайтесь на провокации.''
=== Порядок действий ===
Если вас пытаются завербовать, попросите пару дней на раздумья. Используйте это время, чтобы:
* обсудить ситуацию с людьми, на которых вам, собственно, предложили стучать
* обратиться к правозащитникам
* при необходимости — уехать из страны
Помните: ''сотрудничество такого рода является государственной тайной.'' Поэтому если вы согласитесь на него, а потом расскажете кому-нибудь об этом — вас могут привлечь за разглашение гостайны.
== Защита ==
Необходимо поддерживать в организации атмосферу открытости. Это поможет человеку, которого вербуют спецслужбы, доверить свою тайну остальным и принять верное решение.
== Известные агенты ==
* Всеволод Осипов<ref>{{cite web|url=https://meduza.io/feature/2022/07/11/puskay-vse-znayut-chto-ya-agent|title=«Пускай все знают, что я — агент»|language=ru|date=2022-07-11}}</ref>
== См. также ==
* [[Внедрённый агент]]
== Примечания ==
{{примечания}}
== Ссылки ==
* «[https://dept.one/ Первый отдел]» — правозащитная организация, оказывающая помощь в том числе завербованным агентам.
[[Категория:Угрозы]]
26325083540fcc29f8b56f34372f4c799290cef3
150
108
2022-08-23T15:55:05Z
CyberTailor
2
/* Известные агенты */ Михаил Соколов
wikitext
text/x-wiki
'''Завербованный информатор''' — член организации, сотрудничающий с силовиками.
== Вербовка ==
Цель вербовки — создание сети информаторов в политических организациях. Полученные сведения спецслужбы используют для подавления деятельности этих организаций.
Предлагая стучать, силовики стараются быть максимально убедительными. Уговоры могут принимать форму:
* прямых угроз («не будешь сотрудничать — будешь сидеть»)
* манипуляций («все твои друзья уже стучат»)
* попыток подружиться («мы не враги, хотим помочь»)
Однако ''силовики частно обманывают,'' и их «помощь» может обернуться большими проблемами. ''Не поддавайтесь на провокации.''
=== Порядок действий ===
Если вас пытаются завербовать, попросите пару дней на раздумья. Используйте это время, чтобы:
* обсудить ситуацию с людьми, на которых вам, собственно, предложили стучать
* обратиться к правозащитникам
* при необходимости — уехать из страны
Помните: ''сотрудничество такого рода является государственной тайной.'' Поэтому если вы согласитесь на него, а потом расскажете кому-нибудь об этом — вас могут привлечь за разглашение гостайны.
== Защита ==
Необходимо поддерживать в организации атмосферу открытости. Это поможет человеку, которого вербуют спецслужбы, доверить свою тайну остальным и принять верное решение.
== Известные агенты ==
* Всеволод Осипов<ref>{{cite web|url=https://meduza.io/feature/2022/07/11/puskay-vse-znayut-chto-ya-agent|title=«Пускай все знают, что я — агент»|language=ru|date=2022-07-11}}</ref>
* Михаил Соколов<ref>{{cite web|url=https://verstka.media/soratnik-navalnogo-rabotal-na-fsb/|title=Бывший соратник Навального признался в 6‑летней работе на спецслужбу|language=ru|date=2022-08-23}}</ref>
== См. также ==
* [[Внедрённый агент]]
== Примечания ==
{{примечания}}
== Ссылки ==
* «[https://dept.one/ Первый отдел]» — правозащитная организация, оказывающая помощь в том числе завербованным агентам.
[[Категория:Угрозы]]
cd6ac62f185677ec1ed3d57b37c75dad117c81ec
Внедрённый агент
0
66
105
2022-07-20T13:06:29Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Внедрённый агент''' — сотрудник спецслужб, вступивший в организацию под прикрытием.
== Защита ==
С каждым кандидатом в члены организации необходимо встретиться и поговорить лично, в том челе и о политике.
== Известные агенты ==
* Родион (Раду) Владимирович Зелинский<ref>{{cite web|url=https://delonove.ru/|title=Дело «Нового величия»}}</ref> (он же ''Руслан Данилов'', он же ''Константин А.'')
== Примечания ==
{{примечания}}
[[Категория:Угрозы]]
955034c33a0aec0d8fab2bd18c8ba14659973f4c
106
105
2022-07-20T13:07:28Z
CyberTailor
2
/* Защита */ очепятка
wikitext
text/x-wiki
'''Внедрённый агент''' — сотрудник спецслужб, вступивший в организацию под прикрытием.
== Защита ==
С каждым кандидатом в члены организации необходимо встретиться и поговорить лично, в том числе и о политике.
== Известные агенты ==
* Родион (Раду) Владимирович Зелинский<ref>{{cite web|url=https://delonove.ru/|title=Дело «Нового величия»}}</ref> (он же ''Руслан Данилов'', он же ''Константин А.'')
== Примечания ==
{{примечания}}
[[Категория:Угрозы]]
a96bbe66e854b5b5a386659218883ad3e20dbc69
107
106
2022-07-20T13:08:19Z
CyberTailor
2
Раздел "См. также"
wikitext
text/x-wiki
'''Внедрённый агент''' — сотрудник спецслужб, вступивший в организацию под прикрытием.
== Защита ==
С каждым кандидатом в члены организации необходимо встретиться и поговорить лично, в том числе и о политике.
== Известные агенты ==
* Родион (Раду) Владимирович Зелинский<ref>{{cite web|url=https://delonove.ru/|title=Дело «Нового величия»}}</ref> (он же ''Руслан Данилов'', он же ''Константин А.'')
== См. также ==
* [[Завербованный информатор]]
== Примечания ==
{{примечания}}
[[Категория:Угрозы]]
5f63270b17e9edc9d9eda396437074313f4cf3bc
Студенческое антивоенное движение
0
45
109
69
2022-07-20T13:36:49Z
CyberTailor
2
Деятельность
wikitext
text/x-wiki
{{СтудОрг
|Деятельность=
* Расклейка [[листовка|листовок]] и [[стикер]]ов
|Сайт=https://time-citipati-5f4.notion.site/de0908aa8827479aae94784816320be8
|Инстаграм={{Инстаграм|studentsvswar}}
|Канал={{Канал|antiwarstudents}}
}}
'''Студенческое антивоенное движение''' (ранее ''«Студенты против войны»'') ― анонимная и децентрализованная студенческая антивоенная организация.
== Кампании ==
=== «Ректор, отзови подпись!» ===
Кампания возникла в ответ на публикацию [https://rsr-online.ru/news/2022/3/4/obrashenie-rossijskogo-soyuza-rektorov/ открытого письма] Российского Союза Ректоров, поддержавшего военные действия на территории Украины.
На момент написания правки ни один ректор не отозвал свою подпись.
== Ссылки ==
* [https://posle.media/?p=696 Транскрипт круглого стола студенческих инициатив].
7a34f0ff3a488b1ce9e040a3eef2e28a8c174336
Заглавная страница
0
2
110
101
2022-07-20T14:11:18Z
CyberTailor
2
кнопка "создать страницу"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Antiwarriors]]
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
* Медиа «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
eed96cf8703115635d6e3c78b38ea74deeaf65dd
111
110
2022-07-21T08:33:16Z
CyberTailor
2
/* Медиапроекты */ медиа "очнись"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Antiwarriors]]
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
* Медиа «[[Получится]]»
* [[ОЧНИСЬ!|#ОЧНИСЬ!]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
f8246dc0e6b81ce734d604050f09c994954e5f4f
112
111
2022-07-21T08:40:25Z
CyberTailor
2
/* Региональные организации */ новая организация
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Медиапроекты ==
* [[Antiwarriors]]
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
* Медиа «[[Получится]]»
* [[ОЧНИСЬ!|#ОЧНИСЬ!]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
640cdda35d1cad1a2bbbcff7f1a380dd962a080f
115
112
2022-07-26T16:03:11Z
CyberTailor
2
Раздел "Межрегиональные организации"
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* [[Antiwarriors]]
* [[Антивоенный Больничный]]
* [[Медиа Партизаны]]
* Медиа «[[Получится]]»
* [[ОЧНИСЬ!|#ОЧНИСЬ!]]
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
ed9dd4d01ce338c893d1b440ec56c81c0c6e3060
127
115
2022-07-31T14:31:02Z
CyberTailor
2
/* Медиапроекты */ кавычки
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
56a7a8a39bb77e7a0b7ac2203e28c0577ccdc2fd
Антивоенный комитет Кубани
0
23
113
88
2022-07-21T08:45:23Z
CyberTailor
2
ссылка на источник
wikitext
text/x-wiki
{{РегОрг
|Регион=Краснодарский край
|Деятельность=
* Расклейка [[листовка|листовок]] и [[стикер]]ов
|Канал={{Канал|navalnyKRD}}
}}
'''Антивоенный комитет Кубани''' — антивоенная организация, созданная сторонниками [[Алексей Навальный|Алексея Навального]].
== Пожертвования ==
Комитет собирает деньги на печать листовок через [bitcoin:bc1q2few9favd33w6swec882kpuy70affs6cld27fv биткоин-кошелёк] и на карту Сбербанка <code>5469 9804 2048 5035</code><ref>https://t.me/navalnyKRD/3702</ref>.
== Примечания ==
{{примечания}}
3603902031fd1944f573ed180698424ca62dea5e
Смоленск. Против войны
0
67
114
2022-07-21T09:20:48Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{РегОрг
|Регион=Смоленская область
|Деятельность=
* Организация публичных собраний
* Поддержка политзаключённых
|Канал={{Канал|SmolenskProtiv}}
}}
'''Смоленск. Против войны''' — городская инициативная группа.
bbf6fe87a71d98d68fe5ff0f9c13fbf335db19ae
Шаблон:Орг
10
68
116
2022-07-26T16:19:24Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Основатель"><label>Основатели</label></data>
<data source="Лидер"><label>Лидеры</label></data>
<data source="Идеология"><label>Идеология</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Сайт</label></data>
<data source="Твиттер"><label>Twitter</label></data>
<data source="Инстаграм"><label>Instagram ''(соцсеть, запрещённая в РФ)''</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Антивоенные организации]]}}<noinclude>{{doc}}</noinclude>
50c8ada608c74244fbc75ffc1de87cae7662ba54
Шаблон:Орг/doc
10
69
117
2022-07-26T16:21:48Z
CyberTailor
2
Документация
wikitext
text/x-wiki
Шаблон для межрегиональных организаций.
== Образцы для копирования ==
'''Полный вариант'''
<nowiki>{{Орг |Лого= |Название= |Основатель= |Лидер= |Идеология= |Деятельность= |Сайт= |Твиттер= |Инстаграм=| Канал=}}</nowiki>
'''Полный вариант, многострочный'''
<nowiki>{{Орг
|Лого =
|Название =
|Основатель =
|Лидер =
|Идеология =
|Деятельность =
|Сайт =
|Твиттер =
|Инстаграм =
|Канал =
}}</nowiki>
d249efd90f15ba392054192d5253a27abad1aad3
Антивоенный больничный
0
70
118
2022-07-26T16:59:44Z
CyberTailor
2
Перенаправление на [[Антивоенный Больничный]]
wikitext
text/x-wiki
#перенаправление [[Антивоенный Больничный]]
5894eeefd7b8bb7a57d726f8635e1515b44e11e5
Феминистское антивоенное сопротивление
0
71
119
2022-07-26T17:12:10Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg/edit#gid=0|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]».
== Известные активист_ки ==
* [[Дарья Серенко]]
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
38b390c90c669c686e30282d3bcb8857b192f3ce
149
119
2022-08-04T16:35:14Z
CyberTailor
2
/* Проекты */ Тихий пикет
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg/edit#gid=0|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
b081ce26b4fa2bea07a030f6b4da84f293293044
ФАС
0
72
120
2022-07-26T17:39:12Z
CyberTailor
2
Перенаправление на [[Феминистское антивоенное сопротивление]]
wikitext
text/x-wiki
#перенаправление [[Феминистское антивоенное сопротивление]]
529f78665af3c2e999d2e1c778069f864b2a6b5b
Тюменское движение НЕТВОЙНЕ
0
17
121
29
2022-07-26T18:11:52Z
CyberTailor
2
/* Известные активисты */ имя-фамилия
wikitext
text/x-wiki
{{неверный заголовок|Тюменское движение #НЕТВОЙНЕ}}
{{РегОрг
|Лого=Image:Nowar72_logo.jpg
|Название=Тюменское движение #НЕТВОЙНЕ
|Регион=Юг Тюменской области
|Деятельность=
* [[Митинг|Уличные акции]]
* Расклейка [[листовка|листовок]] и [[стикер]]ов
* Поддержка политзаключённых
|Сайт=https://nowar72.info
|Канал={{Канал|nowar72}}
}}
'''Тюменское движение #НЕТВОЙНЕ''' — независимая антивоенная организация.
== История ==
Были одними из организаторов [[митинг]]ов 6 и 13 марта в Тюмени. В обоих случаях акции провести не удалось из-за оцепления площади полицией.
== Известные активисты ==
* [[Кирилл Мартюшев|Кирилл Мартюшев]] — политзаключённый<ref>{{cite web|url=https://novayagazeta.ru/articles/2022/03/07/ugolovnyi-kodeks-mira|title=Уголовный кодекс «мира»|date=2022-03-07}}</ref>.
== Примечания ==
{{примечания}}
01568103871eb06084827e2352ff1f7c0ddbf21b
122
121
2022-07-26T18:16:09Z
CyberTailor
2
/* Известные активисты */ фамилия-имя
wikitext
text/x-wiki
{{неверный заголовок|Тюменское движение #НЕТВОЙНЕ}}
{{РегОрг
|Лого=Image:Nowar72_logo.jpg
|Название=Тюменское движение #НЕТВОЙНЕ
|Регион=Юг Тюменской области
|Деятельность=
* [[Митинг|Уличные акции]]
* Расклейка [[листовка|листовок]] и [[стикер]]ов
* Поддержка политзаключённых
|Сайт=https://nowar72.info
|Канал={{Канал|nowar72}}
}}
'''Тюменское движение #НЕТВОЙНЕ''' — независимая антивоенная организация.
== История ==
Были одними из организаторов [[митинг]]ов 6 и 13 марта в Тюмени. В обоих случаях акции провести не удалось из-за оцепления площади полицией.
== Известные активисты ==
* [[Мартюшев, Кирилл Игоревич|Кирилл Мартюшев]] — политзаключённый<ref>{{cite web|url=https://novayagazeta.ru/articles/2022/03/07/ugolovnyi-kodeks-mira|title=Уголовный кодекс «мира»|date=2022-03-07}}</ref>.
== Примечания ==
{{примечания}}
b0fec887f29df4f198daf8f62094946901f7c166
ОЧНИСЬ!
0
73
123
2022-07-31T14:11:15Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{Медиа
|Год=2022
|Сайт=https://wakeuprussia.onrender.com
|Канал={{Канал|mpartisans}}
}}
{{неверный заголовок|#ОЧНИСЬ!}}
'''#ОЧНИСЬ!''' — проект, описывающий себя как общественное движение сознательных граждан России.
== Проекты ==
=== reMap ===
В марте 2022 года был запущен сайт [http://remap-ru.com reMap] — интерактивная карта протестов в России.
== Ссылки ==
* [https://t.me/wakeup_russia/682 Пост-знакомство]
* [https://t.me/wakeup_russia/1367 Навигация по каналу]
369d759f0b9c14e191bee12f21fb99ac04b497ab
124
123
2022-07-31T14:12:14Z
CyberTailor
2
фикс названия
wikitext
text/x-wiki
{{Медиа
|Название=#ОЧНИСЬ!
|Год=2022
|Сайт=https://wakeuprussia.onrender.com
|Канал={{Канал|mpartisans}}
}}
{{неверный заголовок|#ОЧНИСЬ!}}
'''#ОЧНИСЬ!''' — проект, описывающий себя как общественное движение сознательных граждан России.
== Проекты ==
=== reMap ===
В марте 2022 года был запущен сайт [http://remap-ru.com reMap] — интерактивная карта протестов в России.
== Ссылки ==
* [https://t.me/wakeup_russia/682 Пост-знакомство]
* [https://t.me/wakeup_russia/1367 Навигация по каналу]
f4b2d11ecc1e01c1e560460e3979cdcf777b7e8d
125
124
2022-07-31T14:12:56Z
CyberTailor
2
фикс названия
wikitext
text/x-wiki
{{Медиа
|Название=<nowiki>#ОЧНИСЬ!</nowiki>
|Год=2022
|Сайт=https://wakeuprussia.onrender.com
|Канал={{Канал|mpartisans}}
}}
{{неверный заголовок|#ОЧНИСЬ!}}
'''#ОЧНИСЬ!''' — проект, описывающий себя как общественное движение сознательных граждан России.
== Проекты ==
=== reMap ===
В марте 2022 года был запущен сайт [http://remap-ru.com reMap] — интерактивная карта протестов в России.
== Ссылки ==
* [https://t.me/wakeup_russia/682 Пост-знакомство]
* [https://t.me/wakeup_russia/1367 Навигация по каналу]
d46f37f9a685b77837298fb3d99d2daa3c9fd5fb
130
125
2022-08-02T04:10:38Z
CyberTailor
2
Проект "Цена войны"
wikitext
text/x-wiki
{{Медиа
|Название=<nowiki>#ОЧНИСЬ!</nowiki>
|Год=2022
|Сайт=https://wakeuprussia.onrender.com
|Канал={{Канал|mpartisans}}
}}
{{неверный заголовок|#ОЧНИСЬ!}}
'''#ОЧНИСЬ!''' — проект, описывающий себя как общественное движение сознательных граждан России.
== Проекты ==
=== reMap ===
В марте 2022 года был запущен сайт [http://remap-ru.com reMap] — интерактивная карта протестов в России. 31 мая 2022 года заблокирован<ref>{{cite web|url=https://reestr.rublacklist.net/record/4455202/|title=Реестр запрещённых сайтов}}</ref> по решению Генпрокуратуры.
=== «Цена войны» ===
В августе 2022 года был запущен сервис «[https://warcost.life/ Цена войны]», позволяющий оценить государственные расходы на военные действия.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/wakeup_russia/682 Пост-знакомство]
* [https://t.me/wakeup_russia/1367 Навигация по каналу]
4052f4fe19935a86a0f7f3488f97e52147920db8
ReMap
0
74
126
2022-07-31T14:15:07Z
CyberTailor
2
Перенаправление на [[ОЧНИСЬ!#reMap]]
wikitext
text/x-wiki
#перенаправление [[ОЧНИСЬ!#reMap]]
56ad4a1a1955b3089dd473762d1f0dfd607a6bca
Категория:Письма политзаключённым
14
75
128
2022-08-02T03:48:48Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
148
128
2022-08-02T12:11:13Z
CyberTailor
2
сноска
wikitext
text/x-wiki
См. также ― [[:Категория:Политзаключённые|Список политзаключённых]].
4f03d9d088f968059851b5e081820a5ca8d1a022
Категория:Письма Кириллу Мартюшеву
0
76
129
2022-08-02T03:50:28Z
CyberTailor
2
Новая категория
wikitext
text/x-wiki
[[Категория:Письма политзаключённым]]
64026417abf30431d208da2433d20eff2d634158
132
129
2022-08-02T05:15:27Z
LetterUploader
11
Новая категория
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Письмо №9963442
0
77
131
2022-08-02T05:13:35Z
LetterUploader
11
Новое письмо
wikitext
text/x-wiki
== Письмо ==
Привет, Кирилл. На самом деле меня зовут Анна. Надеюсь, у тебя уши не вянут от телевизора/радио/что там у вас. И что новости из независимого источника будут как глоток свежего воздуха. А чтобы разбавить печальные известия, вот сперва анекдоты:
— Тебе сколько дали?<br>
— Десять лет.<br>
— За что?<br>
— Да за ни за что!<br>
— Врёшь, за ни за что 5 лет дают.<br>
Рабинович каждое утро подходит к киоску, берет «Правду», оглядывает первую страницу и возвращает газету, не купив. Через несколько дней продавец спрашивает, что он ищет.<br>
— Некролог.<br>
— Некрологи помещают на последней странице.<br>
— Некролог, которого я жду, будет на первой!
Рабиновичу на демонстрации поручают нести портрет Черненко.<br>
— Что вы, товарищи! — отказывается тот — Вы не должны давать мне такое поручение: я нёс портрет Брежнева — и он вскоре умер, я нёс портрет Андропова — и он тоже вскоре умер.<br>
— Товарищ Рабинович, у вас золотые руки!
В КГБ Рабиновича отговаривают ехать в Израиль:<br>
— Думаете, вам там будет хорошо? Знаете, как говориться, хорошо там, где нас нет!<br>
— Вот-вот, я и еду туда, где вас нет!
Приходит один мужик к другому.<br>
— Петрович, помнишь, у тебя зимой жена пропала?<br>
— Ну.<br>
— У меня две новости: плохая и хорошая…<br>
— Давай плохую.<br>
— Мы ее нашли. В реке утонула.<br>
— А хорошая?<br>
— Мы с нее ведро раков сняли.
Идет медведь по лесу, видит, машина горит. Сел в нее и сгорел.
Что такое красное и вредно для зубов? Кирпич.
Далее дословно новости…
''<nowiki>[Дальнейший текст письма не публикуется из соображений безопасности.]</nowiki>''
== Ответ ==
[[Image:Мартюшев 9963442.jpeg|thumb|Оригинал письма]]
Здравствуй, Анюта! Большое спасибо тебе за новости и очень грамотно разбавленное послание анекдотами (4/7 зашли). Прослезился и посмеялся — калейдоскоп эмоций. Отправляй ещё по возможности. У нас нет ничего — только ваши письма, зайчики; да «русское» радио в коридоре. Да такое, я умею отделять информацию и явная ложь вызывает у меня только сюрреалистический смех. Много независимых СМИ ещё живо?
Расскажи о себе, было бы интересно послушать, найти точки соприкосновения, поделиться мыслями. Если будет желание/возможность, конечно. Моё мнение о происходящем ты уже понимаешь, поделюсь с тобой (вами, если опубликуешь письмо) мыслями киевлянина Саши, чья история схожа с стори Сергея Трояна (Гулагу.Нет):
''«Приветствую, Анна! Хотел бы выразить вам огромную благодарность за поддержку в такой тяжёлый период! Из-за таких людей рождается вера в завтрашний светлый день! Я житель Украины, от новостей сердце кровью обливается, ведь моя семья осталась в Киеве и я больше мес. не могу с ними связаться. Но я верб, что на нашей земле наступит мир, ведь побеждает не тот, у кого больше оружия, а тот — у кого правда. Вспоминая историю, всех, кто приходил с войной — ждало поражение. Выиграть войну физически, тогда можно проиграть экономически. Они думают за людей, но людям нужен мир… хотя мнение людей их не интересует. Тогда за что воевать — за эгоистичные интересы диктатора? Или свободу слова, которую они пресекают?
В независимом гос-ве власть работает для людей. У каждого гр-на Украины было право на свободу слова, власть прислушивалась к людям, ведь им виднее, как жить в своей независимой стране! Не боялись выходить на улицу и говорить своё мнение, потому что власть — слуга народа, кот. им и была выбрана. Вопрос запрета свободы слова даже не поднимался, за всю историю Украины.
Владимир Зеленский: очень грамотный человек! На него возлагались большие надежды, и он не подвёл свой народ! Говорить плохо могут те, кто далёк от политики. Сколько неправ. законов и дыр в экономике ему оставили предыдущие?! Он старался как мог, идти против прогнившей системы и с ним были люди, он всегда держал своё слово!»''
Чувство юмора говорит о многом. Действительно, самокритика — важная штука, а здоровая самокритика… Добра и Мира, крепко обнял!
[[Категория:Письма Кириллу Мартюшеву]]
15078e8816a30da4fe8757ab86f6f0ce292effba
133
131
2022-08-02T05:15:52Z
LetterUploader
11
/* Ответ */ курсив
wikitext
text/x-wiki
== Письмо ==
Привет, Кирилл. На самом деле меня зовут Анна. Надеюсь, у тебя уши не вянут от телевизора/радио/что там у вас. И что новости из независимого источника будут как глоток свежего воздуха. А чтобы разбавить печальные известия, вот сперва анекдоты:
— Тебе сколько дали?<br>
— Десять лет.<br>
— За что?<br>
— Да за ни за что!<br>
— Врёшь, за ни за что 5 лет дают.<br>
Рабинович каждое утро подходит к киоску, берет «Правду», оглядывает первую страницу и возвращает газету, не купив. Через несколько дней продавец спрашивает, что он ищет.<br>
— Некролог.<br>
— Некрологи помещают на последней странице.<br>
— Некролог, которого я жду, будет на первой!
Рабиновичу на демонстрации поручают нести портрет Черненко.<br>
— Что вы, товарищи! — отказывается тот — Вы не должны давать мне такое поручение: я нёс портрет Брежнева — и он вскоре умер, я нёс портрет Андропова — и он тоже вскоре умер.<br>
— Товарищ Рабинович, у вас золотые руки!
В КГБ Рабиновича отговаривают ехать в Израиль:<br>
— Думаете, вам там будет хорошо? Знаете, как говориться, хорошо там, где нас нет!<br>
— Вот-вот, я и еду туда, где вас нет!
Приходит один мужик к другому.<br>
— Петрович, помнишь, у тебя зимой жена пропала?<br>
— Ну.<br>
— У меня две новости: плохая и хорошая…<br>
— Давай плохую.<br>
— Мы ее нашли. В реке утонула.<br>
— А хорошая?<br>
— Мы с нее ведро раков сняли.
Идет медведь по лесу, видит, машина горит. Сел в нее и сгорел.
Что такое красное и вредно для зубов? Кирпич.
Далее дословно новости…
''<nowiki>[Дальнейший текст письма не публикуется из соображений безопасности.]</nowiki>''
== Ответ ==
[[Image:Мартюшев 9963442.jpeg|thumb|Оригинал письма]]
Здравствуй, Анюта! Большое спасибо тебе за новости и очень грамотно разбавленное послание анекдотами (4/7 зашли). Прослезился и посмеялся — калейдоскоп эмоций. Отправляй ещё по возможности. У нас нет ничего — только ваши письма, зайчики; да «русское» радио в коридоре. Да такое, я умею отделять информацию и явная ложь вызывает у меня только сюрреалистический смех. Много независимых СМИ ещё живо?
Расскажи о себе, было бы интересно послушать, найти точки соприкосновения, поделиться мыслями. Если будет желание/возможность, конечно. Моё мнение о происходящем ты уже понимаешь, поделюсь с тобой (вами, если опубликуешь письмо) мыслями киевлянина Саши, чья история схожа с стори Сергея Трояна (Гулагу.Нет):
''«Приветствую, Анна! Хотел бы выразить вам огромную благодарность за поддержку в такой тяжёлый период! Из-за таких людей рождается вера в завтрашний светлый день! Я житель Украины, от новостей сердце кровью обливается, ведь моя семья осталась в Киеве и я больше мес. не могу с ними связаться. Но я верб, что на нашей земле наступит мир, ведь побеждает не тот, у кого больше оружия, а тот — у кого правда. Вспоминая историю, всех, кто приходил с войной — ждало поражение. Выиграть войну физически, тогда можно проиграть экономически. Они думают за людей, но людям нужен мир… хотя мнение людей их не интересует. Тогда за что воевать — за эгоистичные интересы диктатора? Или свободу слова, которую они пресекают?''
''В независимом гос-ве власть работает для людей. У каждого гр-на Украины было право на свободу слова, власть прислушивалась к людям, ведь им виднее, как жить в своей независимой стране! Не боялись выходить на улицу и говорить своё мнение, потому что власть — слуга народа, кот. им и была выбрана. Вопрос запрета свободы слова даже не поднимался, за всю историю Украины.''
''Владимир Зеленский: очень грамотный человек! На него возлагались большие надежды, и он не подвёл свой народ! Говорить плохо могут те, кто далёк от политики. Сколько неправ. законов и дыр в экономике ему оставили предыдущие?! Он старался как мог, идти против прогнившей системы и с ним были люди, он всегда держал своё слово!»''
Чувство юмора говорит о многом. Действительно, самокритика — важная штука, а здоровая самокритика… Добра и Мира, крепко обнял!
[[Категория:Письма Кириллу Мартюшеву]]
a87a572989fb222ff6f694e62618dbaf77d41053
Категория:Письма Кириллу Мартюшеву
14
78
134
2022-08-02T05:16:26Z
LetterUploader
11
родительская категория
wikitext
text/x-wiki
[[Категория:Письма политзаключённым]]
64026417abf30431d208da2433d20eff2d634158
147
134
2022-08-02T12:05:08Z
CyberTailor
2
hatnote
wikitext
text/x-wiki
{{hatnote|Основая статья ― [[Кирилл Мартюшев]].}}
[[Категория:Письма политзаключённым]]
08acf069a21e7465f51778f050c2e620c1a37774
Письмо №10111187
0
79
135
2022-08-02T05:39:41Z
LetterUploader
11
Новое письмо
wikitext
text/x-wiki
== Письмо ==
Привет, Кирилл! Твои письма заряжают всех позитивной энергией, так что пиши ещё! После того, как тебе передадут книги, оформим газету «КоммерсантЪ», будешь новости читать. Передать контакты других заключённых для переписки с помощью высокотехнологичного мессенджера «Почта России» мне не дали, но надеюсь нас, неравнодушных со всей России, тебе хватает.
Перейду к ответам. Из независимых СМИ закрылась только «Новая газета», остальные продолжают выполнять свой журналистский долг. А теперь о себе: у меня из-за войны на фоне моего психического расстройства произошло сильное выгорание, я теперь совершенно не хожу на учёбу и не занимаюсь своими хобби. Работаю в Яндекс Еде за копейки, но хоть какие-то деньги. В конце учебного года отчислюсь из ТюмГУ и поступлю в УрФУ на биотехнологии, заочно. Мне Екатеринбург всё-таки больше нравится, чем Тюмень, очень красивый город. Там я закончила 10 и 11 классы в лучшем в мире учебном заведении. А самое главное, ходят трамваи (я от них без ума, они такие классные, люблю, особенно Татра). Пропагандист Соловьёв недавно назвал Ёбург «центром мерзотной либероты, которая породила многих подонков», а подхалим Якушев с ним согласился. Так на них все ополчились, вплоть до губернатора Свердловской области Куйвашева, послали их куда следует. Уже готовится иск в суд, адвокат обещает отличное шоу.
Пора заканчивать письмо, поэтому вот классический анекдот:
Студент решил подработать. Товарищи посоветовали ему устроиться ночным сторожем или дворником. Он пошел в одно место, там места заняты, пошел в другое - то же. Пришел в зоопарк, но там ему сказали, что и сторож и дворник есть и предложили:<br>
— У нас недавно подохла обезьяна. Вы бы могли ее заменить.<br>
— Не знаю, смогу ли, — сомневается студент.<br>
— А вы спортом занимались?<br>
— Занимался.<br>
— Шкура у нас есть и платить будем больше, чем сторожу или дворнику. Ну, студент согласился. Вот, сидит он в клетке, лазает, рожи посетителям строит, на кольцах крутится, посетители довольны. Вечером, когда посетителей уже стало мало, он спрыгнул на пол, но неудачно, и провалился в клетку, стоявшую под той, в которой он находился. Видит, прямо на него идет лев. Ну, студент думает: «Зря я согласился. Даже за такие деньги». А лев подходит и говорит человеческим голосом:<br>
— Привет! Ты с какого факультета?
На фотографии интернет и ТВ-звезда — толстый кот Стёпа (весит 20 кг) и его хозяйка Баба Валя.
== Ответ ==
[[Image:Мартюшев 10111187.jpeg|thumb|Оригинал письма]]
Анна, салют! Пишу-пишу, распространяйте. Походу книги передадут, когда уже буду на наизком старте на выход… А чё так можно было? Газету можно прям щас! ДааЮ знаю насчёт этой цензуры галимой: из последнего не пропустили даже рваных джинс от друга — ну какие-то же рамки морали должны быть… Ахтунг полный! Поправляйся, Анюта. Посоветовал бы грибочки: Ежовик да Мухоморчик, можешь почитать. Удачи в учёбе и делах! Сам на биотех. подавал — не прошёл; ветеринаром — не пошло. Расскажешь, как соловьиный помёт там размажется. А Екат неплохой, да. Как-то не вкурил его прикола, а потом кааак вкурил: улочки маленькие, пешеходники долгие — не так шумно, как на наших громадных дорогах. Но Россия, ёмаё, любит меня насильно. Токсичные отношения. Поэтому их планировалось оставить. Но нет… теперь сижу в её духовном воплощении. Больше понимания о всей ситуации складывается, однако…
Фига котька-пузач! Как-то я кота на попечение срселке оставил, говорю: «Вот эту тарелку в день давать». Приезжаю, а у него вся миска горой и сам ходит толстопуз! Я в ахуе! «А я думала вдруг он голоден будет, 3 р/день такую порцию давала». Оно понятно, у неё Kitekat, а у меня нормальный корм был (только жира много). Сейчас ходит, пузяка болтается. Этот голубой русский с британкой уже почти душа в душу, за 3 года-то.
Слушай, Аннушка,если есть связь с ребятами, можешь передать им мою просьбу в некоторых вещах: ручкие синие BIC (тонкие); гелевые ручки (были бы тоже кстати); третрадки; ну и остальное тож чай-май, к чаю-маю (по возможности). Какие ещё радости у арестантов тут остаются-то?
Даа, сейчас бы электроники медиативной, китайского чаю да благовоний… Нашёл с музыкой выход: есть радиостанция Релакс FM, бомба! Спокойная бомба! А с книгами — ''(не удалось разобрать слово)'' книга! Обнял тепло и крепко!
3a15eb6aa5b6c6d827ec32bf3776f424fc601d37
136
135
2022-08-02T05:40:20Z
LetterUploader
11
категория
wikitext
text/x-wiki
== Письмо ==
Привет, Кирилл! Твои письма заряжают всех позитивной энергией, так что пиши ещё! После того, как тебе передадут книги, оформим газету «КоммерсантЪ», будешь новости читать. Передать контакты других заключённых для переписки с помощью высокотехнологичного мессенджера «Почта России» мне не дали, но надеюсь нас, неравнодушных со всей России, тебе хватает.
Перейду к ответам. Из независимых СМИ закрылась только «Новая газета», остальные продолжают выполнять свой журналистский долг. А теперь о себе: у меня из-за войны на фоне моего психического расстройства произошло сильное выгорание, я теперь совершенно не хожу на учёбу и не занимаюсь своими хобби. Работаю в Яндекс Еде за копейки, но хоть какие-то деньги. В конце учебного года отчислюсь из ТюмГУ и поступлю в УрФУ на биотехнологии, заочно. Мне Екатеринбург всё-таки больше нравится, чем Тюмень, очень красивый город. Там я закончила 10 и 11 классы в лучшем в мире учебном заведении. А самое главное, ходят трамваи (я от них без ума, они такие классные, люблю, особенно Татра). Пропагандист Соловьёв недавно назвал Ёбург «центром мерзотной либероты, которая породила многих подонков», а подхалим Якушев с ним согласился. Так на них все ополчились, вплоть до губернатора Свердловской области Куйвашева, послали их куда следует. Уже готовится иск в суд, адвокат обещает отличное шоу.
Пора заканчивать письмо, поэтому вот классический анекдот:
Студент решил подработать. Товарищи посоветовали ему устроиться ночным сторожем или дворником. Он пошел в одно место, там места заняты, пошел в другое - то же. Пришел в зоопарк, но там ему сказали, что и сторож и дворник есть и предложили:<br>
— У нас недавно подохла обезьяна. Вы бы могли ее заменить.<br>
— Не знаю, смогу ли, — сомневается студент.<br>
— А вы спортом занимались?<br>
— Занимался.<br>
— Шкура у нас есть и платить будем больше, чем сторожу или дворнику. Ну, студент согласился. Вот, сидит он в клетке, лазает, рожи посетителям строит, на кольцах крутится, посетители довольны. Вечером, когда посетителей уже стало мало, он спрыгнул на пол, но неудачно, и провалился в клетку, стоявшую под той, в которой он находился. Видит, прямо на него идет лев. Ну, студент думает: «Зря я согласился. Даже за такие деньги». А лев подходит и говорит человеческим голосом:<br>
— Привет! Ты с какого факультета?
На фотографии интернет и ТВ-звезда — толстый кот Стёпа (весит 20 кг) и его хозяйка Баба Валя.
== Ответ ==
[[Image:Мартюшев 10111187.jpeg|thumb|Оригинал письма]]
Анна, салют! Пишу-пишу, распространяйте. Походу книги передадут, когда уже буду на наизком старте на выход… А чё так можно было? Газету можно прям щас! ДааЮ знаю насчёт этой цензуры галимой: из последнего не пропустили даже рваных джинс от друга — ну какие-то же рамки морали должны быть… Ахтунг полный! Поправляйся, Анюта. Посоветовал бы грибочки: Ежовик да Мухоморчик, можешь почитать. Удачи в учёбе и делах! Сам на биотех. подавал — не прошёл; ветеринаром — не пошло. Расскажешь, как соловьиный помёт там размажется. А Екат неплохой, да. Как-то не вкурил его прикола, а потом кааак вкурил: улочки маленькие, пешеходники долгие — не так шумно, как на наших громадных дорогах. Но Россия, ёмаё, любит меня насильно. Токсичные отношения. Поэтому их планировалось оставить. Но нет… теперь сижу в её духовном воплощении. Больше понимания о всей ситуации складывается, однако…
Фига котька-пузач! Как-то я кота на попечение срселке оставил, говорю: «Вот эту тарелку в день давать». Приезжаю, а у него вся миска горой и сам ходит толстопуз! Я в ахуе! «А я думала вдруг он голоден будет, 3 р/день такую порцию давала». Оно понятно, у неё Kitekat, а у меня нормальный корм был (только жира много). Сейчас ходит, пузяка болтается. Этот голубой русский с британкой уже почти душа в душу, за 3 года-то.
Слушай, Аннушка,если есть связь с ребятами, можешь передать им мою просьбу в некоторых вещах: ручкие синие BIC (тонкие); гелевые ручки (были бы тоже кстати); третрадки; ну и остальное тож чай-май, к чаю-маю (по возможности). Какие ещё радости у арестантов тут остаются-то?
Даа, сейчас бы электроники медиативной, китайского чаю да благовоний… Нашёл с музыкой выход: есть радиостанция Релакс FM, бомба! Спокойная бомба! А с книгами — ''(не удалось разобрать слово)'' книга! Обнял тепло и крепко!
[[Категория:Письма Кириллу Мартюшеву]]
cb0347bb92a26bd6414e5d00f3a21217568970d1
138
136
2022-08-02T05:42:43Z
LetterUploader
11
перенос строки
wikitext
text/x-wiki
== Письмо ==
Привет, Кирилл! Твои письма заряжают всех позитивной энергией, так что пиши ещё! После того, как тебе передадут книги, оформим газету «КоммерсантЪ», будешь новости читать. Передать контакты других заключённых для переписки с помощью высокотехнологичного мессенджера «Почта России» мне не дали, но надеюсь нас, неравнодушных со всей России, тебе хватает.
Перейду к ответам. Из независимых СМИ закрылась только «Новая газета», остальные продолжают выполнять свой журналистский долг. А теперь о себе: у меня из-за войны на фоне моего психического расстройства произошло сильное выгорание, я теперь совершенно не хожу на учёбу и не занимаюсь своими хобби. Работаю в Яндекс Еде за копейки, но хоть какие-то деньги. В конце учебного года отчислюсь из ТюмГУ и поступлю в УрФУ на биотехнологии, заочно. Мне Екатеринбург всё-таки больше нравится, чем Тюмень, очень красивый город. Там я закончила 10 и 11 классы в лучшем в мире учебном заведении. А самое главное, ходят трамваи (я от них без ума, они такие классные, люблю, особенно Татра). Пропагандист Соловьёв недавно назвал Ёбург «центром мерзотной либероты, которая породила многих подонков», а подхалим Якушев с ним согласился. Так на них все ополчились, вплоть до губернатора Свердловской области Куйвашева, послали их куда следует. Уже готовится иск в суд, адвокат обещает отличное шоу.
Пора заканчивать письмо, поэтому вот классический анекдот:
Студент решил подработать. Товарищи посоветовали ему устроиться ночным сторожем или дворником. Он пошел в одно место, там места заняты, пошел в другое - то же. Пришел в зоопарк, но там ему сказали, что и сторож и дворник есть и предложили:<br>
— У нас недавно подохла обезьяна. Вы бы могли ее заменить.<br>
— Не знаю, смогу ли, — сомневается студент.<br>
— А вы спортом занимались?<br>
— Занимался.<br>
— Шкура у нас есть и платить будем больше, чем сторожу или дворнику.<br>
Ну, студент согласился. Вот, сидит он в клетке, лазает, рожи посетителям строит, на кольцах крутится, посетители довольны. Вечером, когда посетителей уже стало мало, он спрыгнул на пол, но неудачно, и провалился в клетку, стоявшую под той, в которой он находился. Видит, прямо на него идет лев. Ну, студент думает: «Зря я согласился. Даже за такие деньги». А лев подходит и говорит человеческим голосом:<br>
— Привет! Ты с какого факультета?
На фотографии интернет и ТВ-звезда — толстый кот Стёпа (весит 20 кг) и его хозяйка Баба Валя.
== Ответ ==
[[Image:Мартюшев 10111187.jpeg|thumb|Оригинал письма]]
Анна, салют! Пишу-пишу, распространяйте. Походу книги передадут, когда уже буду на наизком старте на выход… А чё так можно было? Газету можно прям щас! ДааЮ знаю насчёт этой цензуры галимой: из последнего не пропустили даже рваных джинс от друга — ну какие-то же рамки морали должны быть… Ахтунг полный! Поправляйся, Анюта. Посоветовал бы грибочки: Ежовик да Мухоморчик, можешь почитать. Удачи в учёбе и делах! Сам на биотех. подавал — не прошёл; ветеринаром — не пошло. Расскажешь, как соловьиный помёт там размажется. А Екат неплохой, да. Как-то не вкурил его прикола, а потом кааак вкурил: улочки маленькие, пешеходники долгие — не так шумно, как на наших громадных дорогах. Но Россия, ёмаё, любит меня насильно. Токсичные отношения. Поэтому их планировалось оставить. Но нет… теперь сижу в её духовном воплощении. Больше понимания о всей ситуации складывается, однако…
Фига котька-пузач! Как-то я кота на попечение срселке оставил, говорю: «Вот эту тарелку в день давать». Приезжаю, а у него вся миска горой и сам ходит толстопуз! Я в ахуе! «А я думала вдруг он голоден будет, 3 р/день такую порцию давала». Оно понятно, у неё Kitekat, а у меня нормальный корм был (только жира много). Сейчас ходит, пузяка болтается. Этот голубой русский с британкой уже почти душа в душу, за 3 года-то.
Слушай, Аннушка,если есть связь с ребятами, можешь передать им мою просьбу в некоторых вещах: ручкие синие BIC (тонкие); гелевые ручки (были бы тоже кстати); третрадки; ну и остальное тож чай-май, к чаю-маю (по возможности). Какие ещё радости у арестантов тут остаются-то?
Даа, сейчас бы электроники медиативной, китайского чаю да благовоний… Нашёл с музыкой выход: есть радиостанция Релакс FM, бомба! Спокойная бомба! А с книгами — ''(не удалось разобрать слово)'' книга! Обнял тепло и крепко!
[[Категория:Письма Кириллу Мартюшеву]]
4796fee7bdc9b66db5c42cc78cc4273a106e2a11
Мартюшев, Кирилл Игоревич
0
35
137
92
2022-08-02T05:42:41Z
CyberTailor
2
Раздел "См. также"
wikitext
text/x-wiki
{{Политзек
|ФИО=Кирилл Игоревич Мартюшев
|Город=Тюмень
|Деятельность=студент
|Статья=280, часть 2
|Следователь=Анатолий Сухарев
|Адвокат=Павел Руснаков
|ДатаРождения=11.04.1999
|Регион=Тюменская область
|Учреждение=СИЗО-1 Тюмень
}}
'''Кирилл Игоревич Мартюшев''' — политзаключённый, активист [[Тюменское движение НЕТВОЙНЕ|Тюменского движения #НЕТВОЙНЕ]].
== Личная жизнь ==
Находясь в СИЗО, сделал предложение своей девушке.
== См. также ==
* [[:Категория:Письма Кирилла Мартюшеву]]
== Ссылки ==
* [https://taplink.cc/freekirill Сайт «Свободу Кириллу Мартюшеву!»]
f5f1194039f327dc488d8b9e8ca22694aa05a89b
140
137
2022-08-02T05:56:19Z
CyberTailor
2
/* См. также */ опечатка
wikitext
text/x-wiki
{{Политзек
|ФИО=Кирилл Игоревич Мартюшев
|Город=Тюмень
|Деятельность=студент
|Статья=280, часть 2
|Следователь=Анатолий Сухарев
|Адвокат=Павел Руснаков
|ДатаРождения=11.04.1999
|Регион=Тюменская область
|Учреждение=СИЗО-1 Тюмень
}}
'''Кирилл Игоревич Мартюшев''' — политзаключённый, активист [[Тюменское движение НЕТВОЙНЕ|Тюменского движения #НЕТВОЙНЕ]].
== Личная жизнь ==
Находясь в СИЗО, сделал предложение своей девушке.
== См. также ==
* [[:Категория:Письма Кириллу Мартюшеву|Письма Кириллу Мартюшеву]]
== Ссылки ==
* [https://taplink.cc/freekirill Сайт «Свободу Кириллу Мартюшеву!»]
00a53e0fcecb39a3c74d8ef905ecf9925a5ca461
Письмо №9874533
0
81
141
2022-08-02T06:43:39Z
LetterUploader
11
Новое письмо
wikitext
text/x-wiki
== Ответ ==
[[Image:Мартюшев 9874533.jpeg|thumb|Оригинал письма]]
Салют братец! Приятно тебя слышать! Ждал сообщение от тебя, чуял!
Хахах, орнул с Монетки, блин, не хватает тут музыки нормальной. Пришлите мне тексты какие-нибудь интересные, тут забывается, ничего в голову не приходит, да я ещё из последнего без слов лишь поглощал, дабы успокоиться да замедлиться.
Сейчас проснулся, утренние ритуалы: зарядка, сброс груза, баландёрская каша (лучшее время приёма пищи), папироска с кофейком — простые радости. Чуть позже прогулка ещё будет в коробке и всё тут.
Всё должно быть хорошо, рано или поздно, в конце концов во мраке отмирает всё живое, свет необходим, осталось организмам понять это. А нам, кто понял, раскидывать споры правды дальше, не распадаться: там, где отрезали один грибочек — пусть растёт трое! «Извините, не желаете немного поговорить о мухоморе?»
Мне без книг вот тоже не комильфо, их только посылкой слать, передачи не канают. Объединитесь с моей девушкой, Анютой, отправьте мне «буквенную инфоголовку» (как боеголовка, только круче). Ещё передай, чтобы зуб. нить обязательно в след. передачке закинула, я запамятовал в письме (было шумно), а сейчас беруши придут — забуду х. чего.
Никит, я тут в вакууме, из коридора недавно про инст слышал, хаха, в одном ряду с ними, поэтому больше интересного/мрачного/любого с воли, меня давно не печалят новости, лишь интерес разгорается. Надеюсь у кошельков президента отняли побольше награбленного! Коррупционная гниль пусть превратится в перегной!
Если у кого есть радио — передайте, будет больше возможностей быть в инфополе. Из насущного: печенюхи и любые сладости; чай зелёный; крупы быстрой запарки (а то картошка с капустой и капуста с картошкой надоедает); табак самокруточный и бумагу; фильтры; овощи всегда актуальны (блин, как и всем на воле даже); фрукты; сгущёнка; папиросы (приоритетнее табак); спички. Можно просто копеечку на л/с ареста уронить, кто не может в передачки, адвокат думаю знает где его найти. Порошок; сода; хлор (таблетки). Всё, что расходуется — в ход!
У кого есть баул клетчатый, один будет полезен ваще, а так не срочно его. Бумагу больше не нужно, ручек тоже — нагрели знатно.
Так знаешь, тоже всё не мог написать письма политзаключённому, не знал, стеснялся. Не думал в ближайшей перспективе, что окажусь с другой стороны! Береги себя дружище, крепко обнял! Не забывайте обо мне, делайте мемасики, стикеры. Информация эвривере! Ольвье, жизнь поварам!
[[Категория:Письма Кириллу Мартюшеву]]
e774068d173c6fedd0121a63595bef8b35e9222e
Письмо №9933511
0
82
142
2022-08-02T07:03:14Z
LetterUploader
11
Новое письмо
wikitext
text/x-wiki
== Ответ ==
[[Image:Мартюшев 9933511.jpeg|thumb|Оригинал письма]]
Салют, Ник! Пополнил ты мою информационную потребность хорошечно, благодарю! Знаешь чего интересно, есть ли так же попавшие люди, как я? Хочу початиться с ними через высокотехнологичный сервис «Почта России» (Публикуй все письма, пусть их будет ∞)
Я в шоке! Не понимаю, откуда у ребят из Европы так много неприязни к нам… В таком шоке, что аж люблю их… Похоже у меня стокгольмский синдром! Большое им спасибо, мои крепкие объятия!
Плевать на красоту, дружище, гораздо важнее, что внутри. И так ведь со всем… Искренность, честность особенно ценна во все времена. Можно прятать правду, но она, в конечном итоге, «прятки» этим сама победит.
Расскажу немного, почему вообще я неравнодушен к происходящему: мои личные потребности смог удовлетворить, после этого начинаешь мыслить шире, вне только лишь своих нужд. Меня всегда возмущало лицемерие и эгоизм власть имущих, 24-го февраля не осталось сил это как-то принимать. Тем утром я проснулся удивительно рано, может предчувствие, больше не сомкнул глаз… «Путин начал войну» — кричала лента постами несколькоминутной давности. Я рыдал. Это была смесь разных эмоций, эту бурю никак не получилось утихомирить. Потом пришёл мой кот, успокоил, «нужно что-то делать, молчать и игнорировать — путь в никуда» — из охладившейся головы родилось. Я люблю людей, без разницы какой нации; боль обычных людей пульсировала во мне: кто хотел просто жить в свободной стране, хотел просто иметь средства на существование — теперь, по имперским, эгоистичным мотивам одного человека ни первые, ни вторые этого не получат. Почувствовал, что это край, люди вне политики будут выходить теперь от отчаяния и безысходности, если мы, сознательные и понимающие не сделаем этого раньше. Нужно было подать пример, дать сил.
Мой арест — способ запугать всех неравнодушных. Их любимый метод, они терроризируют нас уже очень долго, свой же народ. Самое важное, что может сделать каждый — рассказывать правду, объединяться с единомышленниками. Нас — большинство. Когда все поймут, что они не одни, вокруг огромное количество здравомыслящих людей, уставших от произвола — начнёт восходить солнце, таять снега и на месте перегноя вырастут цветы.
[[Категория:Письма Кириллу Мартюшеву]]
1d0617d5b4ac4620636aeb4ef75d6093bb7ccbd5
Письмо №9971847
0
83
143
2022-08-02T07:22:19Z
LetterUploader
11
Новое письмо
wikitext
text/x-wiki
== Ответ ==
[[Image:Мартюшев 9971847.jpeg|thumb|Оригинал письма]]
Категорически приветствую, Дмитрий! Как твоё «ничего»? Хочешь рассказать о себе? Мне было бы интересно! Отдуши (с тюрем. — ''благодарю'') за поддержку! Солидарен с содержанием первого письма (хорошо, что ты ответ-таки прицепил), только я здесь не особо грущу (как хотелось бы угнетателям). Тюрьма — есть тюрьма, но везде можно найти свои плюсы: переоценка ценностей, отвязка от гаджетов, возможность сделать упор на саморазвитие (книги мне отдадут только!), инф. вакуум (+-), новые знакомства. Если о последнем пишешь в письмах, то мой экстремистский надзиратель меня переселяет, как и случилось в четверг. Ладно, о крепкой связи с начальником пока умолчим. Одиночка тоже всяк возможна, особенно для такого опасного преступника, как я. не понимаю, почему их всех интересует один вопрос: «Служил ли ты в армии?»… «Аа, тогда не поймёшь». Чего не пойму? Как подчиняться, не выражая своего мнения? Поклоняться культу личности и при этом обвинять меня в экстремизме? Хочу Оурэлла почитать… (Никогда раньше Оурэлла не читал, но в этот раз точно буду! Писатель от народа!) Спасибо за новостную подборку! Передай Никите. что его адреса с такими же экстремистами, которых я хотел поддержать, не прошли цензуру. Селяви. Ещё одно какое-то не прошло, поэтому если кому не отвечаю уже очень долго — дублируйте живописно, метафорично корректируйте. Напоминаю, что отвечаю всем! Всегда рад новым знакомствам. Кстати, был шокирован участию китайцев (это крупица моего шока, основу я уже излил просто), их тоже достали клятые неонацисты и наркоманы, да? А что за «наши»!? имелись в виду «путинских ветеранов»? Не, ну это звучит гордо, базару мало! Бабулям по телевизору понравится, здоровья им! И всем вообще! Психического, самое главное. После него уже и физ. будет в порядке. Или «психологическое здоровье»? Вероятнее 1-ое. <nowiki>[Ае, ае, ван ту, ван ту. Я продолжаю нести эту ерунду.]</nowiki> Не печалься, Димасик, всё будет хорошо! <nowiki>[История в цикле, цикл конечен. Жизнь идёт дальше, лгать нельзя вечно.]</nowiki>
[[Категория:Письма Кириллу Мартюшеву]]
51084c10b5d1ebfdf368c76e6b250cbab082a6d9
Main Page
0
84
144
2022-08-02T08:38:45Z
CyberTailor
2
Перенаправление на [[Заглавная страница]]
wikitext
text/x-wiki
#перенаправление [[Заглавная страница]]
48ee9ddb63eaf6af9905ea5c518645fa978aa735
Социалисты против войны
0
85
145
2022-08-02T09:14:33Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{Орг
|Идеология=социализм, коммунизм
|Деятельность=
* Создание медиа
}}
'''Социалисты против войны''' ― коалиция антивоенных левых сил.
== Проекты ==
=== НЕВОЙНА ===
Информационный ресурс коалиции в формате Telegram-канала ({{Канал|narodpv}}). Кроме освещения протестов публикует также эксклюзивную аналитику, интервью, агитматериалы.
== Галерея ==
<gallery>
Image:Narodpv_logo.svg|Логотип медиа «НЕВОЙНА»
</gallery>
== Ссылки ==
* [https://telegra.ph/Manifest-koalicii-Socialisty-protiv-vojny-03-03-2 Манифест коалиции]
7458002f44532d99a167fc45bfc02880e2bb375b
НЕВОЙНА
0
86
146
2022-08-02T09:21:07Z
CyberTailor
2
Перенаправление на [[Социалисты против войны#НЕВОЙНА]]
wikitext
text/x-wiki
#перенаправление [[Социалисты против войны#НЕВОЙНА]]
4e170c0f178ea8e8cff46d33e70a2f4c2501b521
Гайд-парк
0
87
151
2022-09-22T14:42:48Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Гайд-парк''' — место, специально отведённое или приспособленное для коллективного обсуждения общественно значимых вопросов и выражения общественных настроений, а также для массового присутствия граждан для публичного выражения общественного мнения по поводу актуальных проблем преимущественно общественно-политического характера.
Массовые мероприятия в гайд-парках не требуют согласования с властями.
Во многих случаях проведение акции в гайд-парке нецелесообразно, так как площадка находится где-нибудь в лесу за забором (к примеру, Сокольники в Москве).
== Ссылки ==
* [https://reports.ovdinfo.org/specialnye-ploshchadki-dlya-mitingov Специальные площадки для митингов]
7e095cc4920499cfcb14eb3affa0aad48aa2c8d8
Одиночный пикет
0
88
152
2022-09-22T16:14:57Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Одиночный пикет''' — форма публичного выражения мнения одним человеком с использованием плаката, транспаранта или другого средства наглядной агитации.
== Риски ==
=== «Митинговая» статья ===
Несмотря на то, что одиночный пикет не требует согласования, вас могут задержать по части 2 статьи 20.2 КоАП. Иногда полиция использует провокатора, который встаёт с плакатом рядом с вами. Вас не смогут арестовать за участие в несанкционированной акции, если вы пикетируете в [[гайд-парк]]е.
Чаще применяется часть 5 статьи 20.2 КоАП (нарушение порядка проведения публичной акции). Чтобы избежать задержания, следует ознакомиться с правилами. В частности, с [https://tn.ovdinfo.org/ картой территорий «нельзя»] и региональным законодательством.
=== Статья о «дискредитации» ===
Понятие «дискредитации» очень расплывчатое, и под статью 20.3.3 КоАП можно подвести практически что угодно. Тем не менее, можно формулировать предложения в форме вопроса, а не утверждения. Ни в коем случае не стоит использовать слово «война» (в том числе в зашифрованной форме) и какие-либо фактические данные, которые расходятся с официальными российскими. Призывы следует применять с осторожностью.
=== Статья о нарушении коронавирусных ограничений ===
Ограничения были сняты 1 июля 2022 года<ref>{{cite web|url=https://rospotrebnadzor.ru/about/info/news/news_details.php?ELEMENT_ID=22056|title=Роспотребнадзор снимает введенные из-за пандемии ограничения|date=2022-07-01}}</ref>, так что статья 20.6.1 КоАП больше не должна применяться.
== Поведение на акции ==
Если вы уверены, что полиция вас не задержит, ничего не делайте и просто будьте готовы показать паспорт. Общайтесь вежливо, на равных. Не объясняйте полицейским свою позицию и лозунг плаката (51-я статья). Используйте фразу «выражаю свою гражданскую позицию; всё, что написано у меня на плакате, не нуждается в объяснении». Другие вопросы воспринимайте как попытку вас разговорить.
В противном случае при появлении полицейских лучше уничтожить плакат (порвать или сжечь) и убежать. Но если кто-то успел вас сфотографировать, то вас могут в дальнейшем опознать.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://ovd.legal/instruction/odinochnyy-piket-kak-izbezhat-zaderzhaniya Одиночный пикет] на портале ОВД-Legal.
1db09e8aace40e28bbdf38a3c530250aa333c085
Одиночный пикет
0
88
153
152
2022-09-22T16:42:10Z
CyberTailor
2
Раздел "Оплата штрафов"
wikitext
text/x-wiki
'''Одиночный пикет''' — форма публичного выражения мнения одним человеком с использованием плаката, транспаранта или другого средства наглядной агитации.
== Риски ==
=== «Митинговая» статья ===
Несмотря на то, что одиночный пикет не требует согласования, вас могут задержать по части 2 статьи 20.2 КоАП. Иногда полиция использует провокатора, который встаёт с плакатом рядом с вами. Вас не смогут арестовать за участие в несанкционированной акции, если вы пикетируете в [[гайд-парк]]е.
Чаще применяется часть 5 статьи 20.2 КоАП (нарушение порядка проведения публичной акции). Чтобы избежать задержания, следует ознакомиться с правилами. В частности, с [https://tn.ovdinfo.org/ картой территорий «нельзя»] и региональным законодательством.
=== Статья о «дискредитации» ===
Понятие «дискредитации» очень расплывчатое, и под статью 20.3.3 КоАП можно подвести практически что угодно. Тем не менее, можно формулировать предложения в форме вопроса, а не утверждения. Ни в коем случае не стоит использовать слово «война» (в том числе в зашифрованной форме) и какие-либо фактические данные, которые расходятся с официальными российскими. Призывы следует применять с осторожностью.
=== Статья о нарушении коронавирусных ограничений ===
Ограничения были сняты 1 июля 2022 года<ref>{{cite web|url=https://rospotrebnadzor.ru/about/info/news/news_details.php?ELEMENT_ID=22056|title=Роспотребнадзор снимает введенные из-за пандемии ограничения|date=2022-07-01}}</ref>, так что статья 20.6.1 КоАП больше не должна применяться.
== Поведение на акции ==
Если вы уверены, что полиция вас не задержит, ничего не делайте и просто будьте готовы показать паспорт. Общайтесь вежливо, на равных. Не объясняйте полицейским свою позицию и лозунг плаката (51-я статья). Используйте фразу «выражаю свою гражданскую позицию; всё, что написано у меня на плакате, не нуждается в объяснении». Другие вопросы воспринимайте как попытку вас разговорить.
В противном случае при появлении полицейских лучше уничтожить плакат (порвать или сжечь) и убежать. Но если кто-то успел вас сфотографировать, то вас могут в дальнейшем опознать.
== Оплата штрафов ==
С оплатой штрафов помогает проект «[http://picketman.ru/ Пикетмэн]». Чтобы получить помощь, напишите руководителю проекта [https://t.me/kilgortraut Илье Азару].
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://ovd.legal/instruction/odinochnyy-piket-kak-izbezhat-zaderzhaniya Одиночный пикет] на портале ОВД-Legal.
5650f2bcb5458bd10e0ac00ae6b8a3fd5c23bba0
Листовка
0
24
154
98
2022-10-02T14:24:17Z
CyberTailor
2
/* Расклейка */ Информация о местах для расклейки
wikitext
text/x-wiki
'''Листовка''' — относительно крупный лист обычной бумаги с агитационным содержанием, напечатанный или нарисованный от руки.
== Печать ==
Безопаснее всего печатать дома. Идите в типографию только если им полностью доверяете. Если за вами ведётся наружная слежка, вы создаёте для типографии риск обыска — учитывайте и это тоже.
== Расклейка ==
Чтобы наклеить листовку, можно использовать клейстер, клей ПВА, клей-карандаш и двусторонний скотч (по вкусу). Наносить клей ПВА следует буквой ''N''. Двусторонний скотч стоит клеить на листовку заранее, до выхода на расклейку.
Листовки удобнее всего носить в шоппере, но можно и в рюкзаке. Чем быстрее вы всё сделаете, тем меньше вероятность попасться.
Лучшее время для расклейки — поздний вечер и раннее утро, когда темно и малолюдно.
=== На работе и учёбе ==
Ваши цели — посещаемые, но не наблюдаемые охраной места. Как правило, это туалеты, коридоры, иногда — кабинеты. Листовки можно не только расклеить, но и положить рядом со стопками документов, рядом с книгами в шкафу, оставить на рабочих столах.
=== В подъездах ===
В подъездах у вас есть три цели. Первая — это стены, лифты, доски объявлений, где можно расклеить агитацию. Вторая — это почтовые ящики, куда можно раскидать листовки. Если вы настроены серьезно, то можете наклеить листовку рядом с дверьми квартир или на них.
Попасть в подъезд помогут знакомые, которые там живут, или универсальный ключ от домофона. Коды может подсказать телеграм-бот [https://t.me/padiki_ru_bot @padiki_ru_bot]. Доступ в подъезды клиентов (на время доставки заказа) есть у курьеров, но такая деятельность грозит потерей работы. Ждать, пока кто-то из жителей выйдет, не рекомендуется.
=== На улице ===
Ваши цели — места, где минимум видеонаблюдения и максимум людей. В основном это, конечно, дворы: беседки, детские площадки (там собираются матери, у которых есть мужья и сыновья), столбы, доски объявлений.
Для досок объявлений можно использовать эрзац-листовки, которые выглядят как обычные объявления.
== Правила безопасности ==
# Не выходите на расклейку в одиночку. Всегда кто-то должен стоять на шухере. Если заметите полицию, бегите врассыпную.
# Если вы расклеиваете материалы, носите неприметную одежду. Не ту, которую носите обычно! Также закрывайте лицо и голову, нося маску и кепку. Обязательно. ''И следите за [[камера]]ми.'' Также надевайте перчатки - лучше подстраховаться от пробивки по отпечаткам.
# Не берите с собой ваш обычный телефон. Возьмите «чистый» мобильник с номером ОВД-Инфо — [tel:+78007070528 8 (800) 707-05-28].
# Если вы хотите сфотографировать результаты трудов своих, сделайте это потом. Сначала сходили расклеить, через какое-то время пошли уже в качестве обычного прохожего и сфотографировали как бы мимоходом. Заодно посмотрите, где их сразу срывают, а где остаются висеть. Фото не храните.
# Не носите с собой много листовок сразу. Только то, что собираетесь сразу расклеить. Попасться с большой партией при себе — плохо.
# Возьмите с собой перцовый баллончик. Он поможет защитить себя от агрессивно настроенных граждан.
# Также не храните запас материалов дома. Если вы печатаете в больших масштабах, обустройте «точку» в месте, которое с вами не свяжут. Добираться туда и обратно нужно также соблюдая меры безопасности — скрывая лицо и путая камеры.
# Не расклеивайте по одним и тем же маршрутам, ''не клейте возле вашего дома'' (иначе там будут рыскать полицаи). Меняйте районы, регулярность и время.
# Если вы передаете материалы другим расклейщикам, а 100% доверия им нет (или по другим причинам боитесь передавать при встрече), можно использовать закладки. Закладки отнимают много сил, но повышают безопасность — особенно, если расклейщики вас не знают.. Тут тоже лучше не покрывать отпечатками материалы и пакеты.
# Если решили действовать так, закладки делайте максимально осторожно. Нельзя попадаться камерам и местным жителям (тем более — ментам). Некоторые места (гаражи, опушки парков) популярны у закладчиков наркотиков, поэтому за ними полицаи особо усердно следят. Лучше вообще класть за городом.
== Публичные архивы ==
* [https://drive.google.com/drive/u/1/folders/1LvTi5oGSHAHH1x03sDNfOpCfPAhxmKBb Движение «Весна»]
* [https://drive.google.com/drive/u/1/folders/1itp5TQnps_MP12sU0rWSagryoYi9MUyB Дочери Сиф]
* [https://drive.google.com/drive/u/1/folders/1yyAPv_vCuL96DTwpwb6BV0mZsZu71Sft Медиа Партизаны]
* [https://drive.google.com/drive/u/1/folders/1x9o10NpwfRoyy09R1_r_XeV0fSHlDQWZ Социалистическая Альтернатива]
[[Категория:Виды агитации]]
6e5f1c8cb828f00d7473293356770804ce0e213e
155
154
2022-10-02T14:25:30Z
CyberTailor
2
/* = На работе и учёбе */ Форматирование
wikitext
text/x-wiki
'''Листовка''' — относительно крупный лист обычной бумаги с агитационным содержанием, напечатанный или нарисованный от руки.
== Печать ==
Безопаснее всего печатать дома. Идите в типографию только если им полностью доверяете. Если за вами ведётся наружная слежка, вы создаёте для типографии риск обыска — учитывайте и это тоже.
== Расклейка ==
Чтобы наклеить листовку, можно использовать клейстер, клей ПВА, клей-карандаш и двусторонний скотч (по вкусу). Наносить клей ПВА следует буквой ''N''. Двусторонний скотч стоит клеить на листовку заранее, до выхода на расклейку.
Листовки удобнее всего носить в шоппере, но можно и в рюкзаке. Чем быстрее вы всё сделаете, тем меньше вероятность попасться.
Лучшее время для расклейки — поздний вечер и раннее утро, когда темно и малолюдно.
=== На работе и учёбе ===
Ваши цели — посещаемые, но не наблюдаемые охраной места. Как правило, это туалеты, коридоры, иногда — кабинеты. Листовки можно не только расклеить, но и положить рядом со стопками документов, рядом с книгами в шкафу, оставить на рабочих столах.
=== В подъездах ===
В подъездах у вас есть три цели. Первая — это стены, лифты, доски объявлений, где можно расклеить агитацию. Вторая — это почтовые ящики, куда можно раскидать листовки. Если вы настроены серьезно, то можете наклеить листовку рядом с дверьми квартир или на них.
Попасть в подъезд помогут знакомые, которые там живут, или универсальный ключ от домофона. Коды может подсказать телеграм-бот [https://t.me/padiki_ru_bot @padiki_ru_bot]. Доступ в подъезды клиентов (на время доставки заказа) есть у курьеров, но такая деятельность грозит потерей работы. Ждать, пока кто-то из жителей выйдет, не рекомендуется.
=== На улице ===
Ваши цели — места, где минимум видеонаблюдения и максимум людей. В основном это, конечно, дворы: беседки, детские площадки (там собираются матери, у которых есть мужья и сыновья), столбы, доски объявлений.
Для досок объявлений можно использовать эрзац-листовки, которые выглядят как обычные объявления.
== Правила безопасности ==
# Не выходите на расклейку в одиночку. Всегда кто-то должен стоять на шухере. Если заметите полицию, бегите врассыпную.
# Если вы расклеиваете материалы, носите неприметную одежду. Не ту, которую носите обычно! Также закрывайте лицо и голову, нося маску и кепку. Обязательно. ''И следите за [[камера]]ми.'' Также надевайте перчатки - лучше подстраховаться от пробивки по отпечаткам.
# Не берите с собой ваш обычный телефон. Возьмите «чистый» мобильник с номером ОВД-Инфо — [tel:+78007070528 8 (800) 707-05-28].
# Если вы хотите сфотографировать результаты трудов своих, сделайте это потом. Сначала сходили расклеить, через какое-то время пошли уже в качестве обычного прохожего и сфотографировали как бы мимоходом. Заодно посмотрите, где их сразу срывают, а где остаются висеть. Фото не храните.
# Не носите с собой много листовок сразу. Только то, что собираетесь сразу расклеить. Попасться с большой партией при себе — плохо.
# Возьмите с собой перцовый баллончик. Он поможет защитить себя от агрессивно настроенных граждан.
# Также не храните запас материалов дома. Если вы печатаете в больших масштабах, обустройте «точку» в месте, которое с вами не свяжут. Добираться туда и обратно нужно также соблюдая меры безопасности — скрывая лицо и путая камеры.
# Не расклеивайте по одним и тем же маршрутам, ''не клейте возле вашего дома'' (иначе там будут рыскать полицаи). Меняйте районы, регулярность и время.
# Если вы передаете материалы другим расклейщикам, а 100% доверия им нет (или по другим причинам боитесь передавать при встрече), можно использовать закладки. Закладки отнимают много сил, но повышают безопасность — особенно, если расклейщики вас не знают.. Тут тоже лучше не покрывать отпечатками материалы и пакеты.
# Если решили действовать так, закладки делайте максимально осторожно. Нельзя попадаться камерам и местным жителям (тем более — ментам). Некоторые места (гаражи, опушки парков) популярны у закладчиков наркотиков, поэтому за ними полицаи особо усердно следят. Лучше вообще класть за городом.
== Публичные архивы ==
* [https://drive.google.com/drive/u/1/folders/1LvTi5oGSHAHH1x03sDNfOpCfPAhxmKBb Движение «Весна»]
* [https://drive.google.com/drive/u/1/folders/1itp5TQnps_MP12sU0rWSagryoYi9MUyB Дочери Сиф]
* [https://drive.google.com/drive/u/1/folders/1yyAPv_vCuL96DTwpwb6BV0mZsZu71Sft Медиа Партизаны]
* [https://drive.google.com/drive/u/1/folders/1x9o10NpwfRoyy09R1_r_XeV0fSHlDQWZ Социалистическая Альтернатива]
[[Категория:Виды агитации]]
b86a72d325fb149c390cb3666911af8c447946b2
Гайд-парк
0
87
156
151
2022-10-02T15:36:00Z
CyberTailor
2
Список гайд-парков
wikitext
text/x-wiki
'''Гайд-парк''' — место, специально отведённое или приспособленное для коллективного обсуждения общественно значимых вопросов и выражения общественных настроений, а также для массового присутствия граждан для публичного выражения общественного мнения по поводу актуальных проблем преимущественно общественно-политического характера.
Массовые мероприятия в гайд-парках не требуют согласования с властями.
Во многих случаях проведение акции в гайд-парке нецелесообразно, так как площадка находится где-нибудь в лесу за забором (к примеру, Сокольники в Москве).
== Список гайд-парков по регионам ==
* [Свердловская область https://docs.cntd.ru/document/446428456]
* [Тюменская область https://docs.cntd.ru/document/460117390]
== Ссылки ==
* [https://reports.ovdinfo.org/specialnye-ploshchadki-dlya-mitingov Специальные площадки для митингов], отчёт ОВД-Инфо
a5864eeafc9582e714f0202e85f4430d8ca56ceb
157
156
2022-10-02T15:36:42Z
CyberTailor
2
/* Список гайд-парков по регионам */ форматирование
wikitext
text/x-wiki
'''Гайд-парк''' — место, специально отведённое или приспособленное для коллективного обсуждения общественно значимых вопросов и выражения общественных настроений, а также для массового присутствия граждан для публичного выражения общественного мнения по поводу актуальных проблем преимущественно общественно-политического характера.
Массовые мероприятия в гайд-парках не требуют согласования с властями.
Во многих случаях проведение акции в гайд-парке нецелесообразно, так как площадка находится где-нибудь в лесу за забором (к примеру, Сокольники в Москве).
== Список гайд-парков по регионам ==
* [https://docs.cntd.ru/document/446428456 Свердловская область]
* [https://docs.cntd.ru/document/460117390 Тюменская область]
== Ссылки ==
* [https://reports.ovdinfo.org/specialnye-ploshchadki-dlya-mitingov Специальные площадки для митингов], отчёт ОВД-Инфо
0a1c2a1df672c4c68747059df8764e4494b2ff24
Заглавная страница
0
2
158
127
2022-10-02T18:21:07Z
CyberTailor
2
Защитил страницу [[Заглавная страница]] ([Редактирование=Разрешено только администраторам] (бессрочно) [Переименование=Разрешено только администраторам] (бессрочно))
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
56a7a8a39bb77e7a0b7ac2203e28c0577ccdc2fd
159
158
2022-10-02T18:23:01Z
CyberTailor
2
SEO
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
<seo wmail-verification="48a69e47132e8d3e3aed173d4683486b" />
0c5d5cef7eb70aead9ae676012f27e09458df810
160
159
2022-10-02T18:30:25Z
CyberTailor
2
Отмена правки 159, сделанной [[Special:Contributions/CyberTailor|CyberTailor]] ([[User talk:CyberTailor|обсуждение]])
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
56a7a8a39bb77e7a0b7ac2203e28c0577ccdc2fd
161
160
2022-10-02T18:37:47Z
CyberTailor
2
PageProperties update
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
858a795eb58e6d2c3c387c6746d2cb1debadf37b
162
161
2022-10-02T18:39:29Z
CyberTailor
2
PageProperties update
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
d079fc2fa7b36993f10d0e75cce79a591eeb3db3
166
162
2022-10-18T20:48:33Z
CyberTailor
2
/* Угрозы */ пытка -> пытки
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытка|Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
e89e27b9c08d535a0bc96f38d24dd3b800245c02
193
166
2023-05-14T03:14:59Z
CyberTailor
2
+ новая страница
wikitext
text/x-wiki
Добро пожаловать в базу знаний Сопротивления! Вы можете писать и редактировать статьи на следующие темы:
* Способы сопротивления
* Антивоенные организации
* Разоблачение мифов пропаганды
<div style="margin: 1em auto;">
<inputbox>
type=create
width=50
break=no
</inputbox>
</div>
== Региональные организации ==
* [[Антивоенный комитет Кубани]]
* [[Самара против войны]]
* [[Смоленск. Против войны]]
* [[Тюменское движение НЕТВОЙНЕ|Тюменское движение #НЕТВОЙНЕ]]
== Студенческие организации ==
=== Межвузовские ===
* [[Студенческое антивоенное движение]]
=== Локальные ===
* [[Инициативная группа ТюмГУ]]
* [[Физтех против войны]]
== Межрегиональные организации ==
* [[Социалисты против войны]]
* [[Феминистское антивоенное сопротивление]]
== Медиапроекты ==
* «[[Antiwarriors]]»
* «[[Антивоенный Больничный]]»
* «[[Медиа Партизаны]]»
* «[[ОЧНИСЬ!|#ОЧНИСЬ!]]»
* «[[Получится]]»
== Агитация ==
* [[Листовка]]
* [[Стикер]]
* [[Зелёная лента]]
* [[Надпись]]
* [[Граффити]]
== Угрозы ==
* [[Камера]]
* [[Интернет]]
* [[Наружная слежка]]
* [[Завербованный информатор]]
* [[Внедрённый агент]]
* [[Пытка|Пытки]]
== Протест ==
* [[Одиночный пикет]]
* [[Митинг]]
* [[Забастовка]]
e8e61592c7c128e5878ac8d4260fcc56e0ba7ab7
Категория:Pages with PageProperties
14
89
163
2022-10-18T19:05:16Z
CyberTailor
2
Новая скрытая категория
wikitext
text/x-wiki
__HIDDENCAT__
183b9c38bff80327776bd180634fccfd19cf616f
Пытка
0
90
164
2022-10-18T20:10:50Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
'''Пытка''' ― любое действие, которым какому-либо лицу умышленно причиняется сильная боль или страдание государственным должностным лицом<ref>{{cite web|url=https://www.un.org/ru/documents/decl_conv/conventions/torture.shtml|title=Конвенция против пыток и других жестоких, бесчеловечных или унижающих достоинство видов обращения и наказания}}</ref>. В это определение не включаются боль или страдания, которые возникают лишь в результате законных санкций.
== Поведение ==
=== Во время пыток ===
Каждый, кто сталкивался с пытками или хотя бы побоями в полиции, прекрасно знает, как это страшно, больно и унизительно. И насколько непросто не сдаться и не дать палачам того, что они хотят.
Задача пытающих ― подчинить вас морально. Важно не терять ясности сознания, вести свою игру с ними, в зависимости от ситуации симулируя испуг, преувеличивая физическое страдание или как-либо ещё сбивая палачей с толку.
Способы практического и психологического противодействия пытке — тема закрытой дискуссии. Из того, что можно сказать вслух: когда становится нестерпимо, может помочь, если вы придумаете какую-то ложную версию событий, где не фигурируют какие-либо лица и реальные данные и как бы «зафиксируетесь» на ней, заставите себя поверить, что это правда, и будете настаивать на ней в ходе пытки.
Но лучше, конечно, просто молчать.
=== После пыток ===
Если после избиения вас поместили в ИВС/СИЗО/спецприёмник, сообщите о том, что вас избили, сокамерникам, работникам изолятора, сотрудникам медсанчасти. Если после избиения вас доставили в суд, то сообщите об избиении судебным приставам, судье, секретарю, прокурору.
Если вас пытали и отпустили, то немедленно обратитесь в травмпункт/поликлинику/больницу (в зависимости от тяжести нанесённых повреждений). Проследите, чтобы медработники чётко записали
причины получения повреждений с ваших слов: если не будет зафиксировано, что они возникли в результате действий сотрудников правоохранительных органов, доказать потом это будет сложно.
Далее вам необходимо найти свидетелей. Если насилие к вам применялось на улице или в автозаке — постарайтесь узнать имена и контакты тех, кто оказался рядом. Если же рядом были только сотрудники полиции, при первой возможности сообщите о случившемся другим людям. Вы можете рассказать об этом по телефону или просто первому человеку, с которым удастся поговорить. Опишите, кто и при каких обстоятельствах применял к вам пытки.
Зафиксируйте обстоятельства применения пыток на бумаге или на диктофон. Подробно опишите:
* как выглядели сотрудники полиции, которые применяли пытки, их внешность и имена, если они представились
* место, где к вам применялось насилие
* кто вас бил/истязал, и что при этом использовали
* какие травмы у вас появились
* кто присутствовал при пытках.
Следующим шагом обратитесь в следственный отдел СК РФ того района, где к вам применили пытки. Подать заявление можно нарочным (принести прямо в соответствующий орган) или по почте. Приносите нарочным? Требуйте выдачу талона-уведомления. Отправляете почтой? Узнайте дату регистрации заявления и номер вашего обращения: с его помощью вы сможете отслеживать сроки рассмотрения и принятия решения.
В заявлении кратко расскажите о том, что с вами произошло, указывая лишь ту информацию, которая имеет отношение к применению пыток. Укажите ФИО и контакты свидетелей пыток, приложите копии медицинских документов, а также фото и видео, на которых зафиксированы телесные повреждения.
Общая проверка сведений следователем не может занимать более 30 суток. Если в возбуждении дела
отказано, обращайтесь с жалобой в прокуратуру или в суд. Перед этим у следователя ознакомьтесь с материалами дела, при необходимости зафиксируйте их на фото.
При обжаловании постановления необходимо:
* перечислить обстоятельства, которые следователь упустил в ходе проверки или проигнорировал, принимая решение
* указать, какие действия следователь должен был совершить для установления всех обстоятельств случившегося, но не сделал этого
* проанализировать все неразрешенные следователем противоречия, которые содержатся в материалах проверки.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://pytkam.net Команда против пыток]
* [https://pytkam.net/galereja-pytok/ Галерея пыток]
[[Категория:Угрозы]]
a130aeeec610e923a93354758c26a70612d015b4
Пытки
0
91
165
2022-10-18T20:12:33Z
CyberTailor
2
Перенаправление на [[Пытка]]
wikitext
text/x-wiki
#перенаправление [[Пытка]]
ee4f0c16df2d3fa864ef844338a3f4d5bb2414d1
Антивоенные петиции
0
92
167
2022-10-19T11:09:12Z
Gemsod
12
Новая страница: «Антивоенные петиции - один из способов протеста против вторжения России на Украину. == Список антивоенных петиций == Петиция Льва Понамарёва на change.org. Создана 24 февраля, на момент правки собрала 1,2 млн. подписей. Антивоенная петиция "Яблока". Создана 1...»
wikitext
text/x-wiki
Антивоенные петиции - один из способов протеста против вторжения России на Украину.
== Список антивоенных петиций ==
Петиция Льва Понамарёва на change.org.
Создана 24 февраля, на момент правки собрала 1,2 млн. подписей.
Антивоенная петиция "Яблока".
Создана 13 февраля, на момент правки набрала 89 тыс. подписей.
== Ссылки ==
[https://www.change.org/p/%D0%BE%D1%81%D1%82%D0%B0%D0%BD%D0%BE%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2%D0%BE%D0%B9%D0%BD%D1%83-%D1%81-%D1%83%D0%BA%D1%80%D0%B0%D0%B8%D0%BD%D0%BE%D0%B9-2ce0a2d7-b957-4e23-981a-c67a26e2b0b7 Антивоенная петиция Льва Понамарёва]
[https://www.yabloko.ru/stop-war Антивоенная петиция "Яблока"]
3758a9424c806942b5fc868ef8adab3ae2b43a3c
Зелёная лента
0
39
168
58
2022-10-23T11:05:31Z
VolgogradAgainstTheWar
13
Добавлен источник о движении. Добавлена цель и задача акции
wikitext
text/x-wiki
'''Зелёная лента''' — символ мирного протеста, независимо предложенный разными активистами.
Приобрела популярность благодаря медиа «[[Зелёная лента — символ мирного протеста]]».
Активисты привязывают зеленые ленточки на деревья, столбы и другие элементы окружения. Это делается в знак протеста против войны с Украиной.
Задача акции пробудить к действию тех, у кого есть активная гражданская позиция, кто хочет что-то сделать в создавшейся ситуации, но не знает, что именно.
Подробнее о движении: https://greenlenta.com/
== Покупка ==
Ленты продаются в магазинах тканей, а также в магазинах праздничных товаров.
[[Категория:Виды агитации]]
c4742ed2d1197b9ada4bfd5f2362ab03ba0f5ebc
Феминистское антивоенное сопротивление
0
71
169
149
2023-01-01T18:36:19Z
CyberTailor
2
/* Известные активист_ки */ +Элла Россман
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg/edit#gid=0|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
* [[Элла Россман]]
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
39182e8e2e7505d27b1de650f369f65ace53192b
170
169
2023-01-01T19:08:01Z
CyberTailor
2
Раздел "Критика"
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
* [[Элла Россман]]
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своей публикации<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref>.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
c63646a323b7b80312de0451e292d1655413d6c6
178
170
2023-01-02T02:42:31Z
CyberTailor
2
/* Известные активист_ки */ +Лёля Нордик
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
* [[Лёля Нордик]]
* [[Элла Россман]]
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своей публикации<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref>.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
46be619559780fbc3d1ed3401c57119ab63822a3
179
178
2023-01-04T21:15:43Z
CyberTailor
2
/* Критика */ Вторая часть "ФАСБ"
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
* [[Лёля Нордик]]
* [[Элла Россман]]
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своих публикациях<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref><ref>{{cite web|url=https://telegra.ph/2-FASB-HELP-12-23|title=2. ФАСБ HELP|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций и некомпетентном оказании помощи. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref>.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
ff2a557b32ea6559b76acd5823fc825f1ac9c782
180
179
2023-01-14T20:17:44Z
CyberTailor
2
/* Критика */ 3 часть
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
* [[Лёля Нордик]]
* [[Элла Россман]]
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своих публикациях<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref><ref>{{cite web|url=https://telegra.ph/2-FASB-HELP-12-23|title=2. ФАСБ HELP|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций и некомпетентном оказании помощи. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref><ref>{{cite web|url=https://telegra.ph/3-FASB---kommentarii-k-reakciyam-01-06|title=3. ФАСБ - комментарии к реакциям|author=Мария Наумова|date=2023-01-06}}</ref>.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
c7e82656cd9e4ad1080d4ee1900e5b707a0950e3
184
180
2023-02-25T21:58:30Z
CyberTailor
2
/* Критика */ Статья media resistance group
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
* [[Лёля Нордик]]
* [[Элла Россман]]
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своих публикациях<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref><ref>{{cite web|url=https://telegra.ph/2-FASB-HELP-12-23|title=2. ФАСБ HELP|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций и некомпетентном оказании помощи. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref><ref>{{cite web|url=https://telegra.ph/3-FASB---kommentarii-k-reakciyam-01-06|title=3. ФАСБ - комментарии к реакциям|author=Мария Наумова|date=2023-01-06}}</ref>.
24 февраля 2023 года на канале [[media resistance group]] была опубликована статья<ref>{{cite web|url=https://t.me/nottowar/1147|author=media resistance group|date=2023-02-24}}</ref>, в которой на примере ФАС показываются структурные проблемы российского активизма.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
8a49d650381f837cd09b3815a12955979b27568f
185
184
2023-02-25T22:01:08Z
CyberTailor
2
/* Критика */ фикс ссылки
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Известные активист_ки ==
* [[Дарья Серенко]]
* [[Лёля Нордик]]
* [[Элла Россман]]
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своих публикациях<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref><ref>{{cite web|url=https://telegra.ph/2-FASB-HELP-12-23|title=2. ФАСБ HELP|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций и некомпетентном оказании помощи. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref><ref>{{cite web|url=https://telegra.ph/3-FASB---kommentarii-k-reakciyam-01-06|title=3. ФАСБ - комментарии к реакциям|author=Мария Наумова|date=2023-01-06}}</ref>.
24 февраля 2023 года на канале [[media resistance group]] была опубликована [https://telegra.ph/Retrity-dlya-rossiyan-02-24 cтатья]<ref>https://t.me/nottowar/1147</ref>, в которой на примере ФАС показываются структурные проблемы российского активизма.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
9a086964f7cf57981615f3122d6d1e23b7a78314
186
185
2023-02-25T22:38:54Z
CyberTailor
2
Руководство в карточку
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Лидер=
* [[Дарья Серенко]]
* [[Лёля Нордик]]
* [[Элла Россман]]
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своих публикациях<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref><ref>{{cite web|url=https://telegra.ph/2-FASB-HELP-12-23|title=2. ФАСБ HELP|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций и некомпетентном оказании помощи. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref><ref>{{cite web|url=https://telegra.ph/3-FASB---kommentarii-k-reakciyam-01-06|title=3. ФАСБ - комментарии к реакциям|author=Мария Наумова|date=2023-01-06}}</ref>.
24 февраля 2023 года на канале [[media resistance group]] была опубликована [https://telegra.ph/Retrity-dlya-rossiyan-02-24 cтатья]<ref>https://t.me/nottowar/1147</ref>, в которой на примере ФАС показываются структурные проблемы российского активизма.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
585184761cbb131084431c31d0c667f18f8afb93
190
186
2023-04-11T17:57:12Z
CyberTailor
2
Информация об основателях
wikitext
text/x-wiki
{{Орг
|Лого=File:Logo of the Feminist Anti-War Resistance 01-ru.svg
|Основатель=
* [[wikipedia:ru:Дарья Серенко|Дарья Серенко]]<ref>{{cite web|author=Virginie Pironon|url=https://www.francetvinfo.fr/monde/europe/manifestations-en-ukraine/temoignage-guerre-en-ukraine-la-militante-antiguerre-russe-daria-serenko-se-bat-contre-le-regime-de-vladimir-poutine_5761127.html|title=Guerre en Ukraine : la militante antiguerre russe Daria Serenko se bat contre le régime de Vladimir Poutine|lang=fr|website=Franceinfo|date=2023-04-09|access-date=2023-04-11}}</ref>
* Другие активистки
|Лидер=
* [[wikipedia:ru:Дарья Серенко|Дарья Серенко]]<ref>{{cite web|author=María R. Sahuquillo|url=https://english.elpais.com/international/2023-03-10/activist-daria-serenko-russia-is-a-terrifying-country-for-lgbtq-people.html|title=Activist Daria Serenko: ‘Russia is a terrifying country for LGBTQ+ people’|lang=en|website=EL PAÍS|date=2023-03-10|access-date=2023-03-17}}</ref>
* [[wikipedia:ru:Саша Старость|Cаша Старость]]<ref>{{cite web|author=Анна Боброва|url=https://te-st.org/2022/11/03/feminist-antiwar-resistance/|title=«Мы родились в ситуации горящей жопы». Как устроено Феминистское антивоенное сопротивление|lang=ru|website=Теплица социальных технологий|date=2022-11-03|access-date=2023-03-18}}</ref>
* [[Лёля Нордик]]
* [[Элла Россман]]
|Идеология=Феминизм
|Деятельность=
* Антивоенная агитация
* [[Митинг|Уличные акции]]
* Разработка новых форматов протеста
* Создание медиа
|Твиттер={{Инстаграм|femagainstwar}}
|Инстаграм={{Инстаграм|fem_antiwar_resistance}}
|Канал={{Канал|femagainstwar}}
}}
'''Феминистское антивоенное сопротивление''' (ФАС) — объединение российских феминисток, выступающих против войны.
== Ячейки ==
Чтобы считать себя участни_цей ФАС, достаточно самоназвания<ref>https://t.me/femagainstwar/505</ref>.
Ячейки объединения существуют во многих странах мира<ref>{{cite web|url=https://docs.google.com/spreadsheets/d/1StK9QWwSN-b05DejzSm6qU5rYGHv98yFSHXp08hjoUg|title=ФАС ячейки / FAR groups worlwide}}</ref>. На момент правки не известно ни одной ячейки, которая бы вела свою деятельность в России.
== Проекты ==
ФАС способствовало популяризации акции «[[тихий пикет]]»<ref>{{cite web|url=https://holod.media/2022/03/17/feminizm-ne-vosprinimali-vserez-poetomu-my-ne-tak-razgromleny/|title=«Феминизм не воспринимали всерьез, поэтому мы не так разгромлены»|date=2022-03-17}}</ref>.
Совместно с «[[Антивоенный Больничный|Антивоенным Больничным]]» и «[[wikipedia:ru:Antijob|Антиджобом]]» в марте 2022 года создали «[[АнтиФонд]]»<ref>https://t.me/femagainstwar/862</ref>.
== Критика ==
28 декабря 2022 года активистка Мария Наумова в своих публикациях<ref>{{cite web|url=https://telegra.ph/1-FASB-12-23|title=1. ФАСБ|author=Мария Наумова|date=2022-12-23}}</ref><ref>{{cite web|url=https://telegra.ph/2-FASB-HELP-12-23|title=2. ФАСБ HELP|author=Мария Наумова|date=2022-12-23}}</ref> призвала к ответу публичных представителей ФАС. Она обвинила организацию в небезопасности коммуникаций и некомпетентном оказании помощи. Через некоторое время активистка психологического направления ФАС, Саша Старость, опубликовала в своих соцсетях ответ на обвинения<ref>{{cite web|url=https://docs.google.com/document/d/1L1VzIKlpOKlBshkwwXILTMOkoszGQsYXMzfcMzVJSvI|title=Про ситуацию со «сливом»|author=Саша Старость|date=2022-12-30}}</ref><ref>{{cite web|url=https://telegra.ph/3-FASB---kommentarii-k-reakciyam-01-06|title=3. ФАСБ - комментарии к реакциям|author=Мария Наумова|date=2023-01-06}}</ref>.
24 февраля 2023 года на канале [[media resistance group]] была опубликована [https://telegra.ph/Retrity-dlya-rossiyan-02-24 cтатья]<ref>https://t.me/nottowar/1147</ref>, в которой на примере ФАС показываются структурные проблемы российского активизма.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/femagainstwar/4 Манифест] объединения
* «[[wikipedia:ru:Феминистское антивоенное сопротивление|Феминистское антивоенное сопротивление]]» на Википедии
59ebf48dbfe46bcce91fe21e2bab07218888131a
Шаблон:РегОрг
10
4
171
79
2023-01-01T19:31:44Z
CyberTailor
2
Ссылки на мастодон
wikitext
text/x-wiki
<infobox layout="stacked">
<image source="Лого" />
<title source="Название"><default><includeonly>{{PAGENAME}}</includeonly></default></title>
<group>
<data source="Регион"><label>Регион</label></data>
<data source="Деятельность"><label>Деятельность</label></data>
</group>
<group>
<header>Ссылки</header>
<data source="Сайт"><label>Сайт</label></data>
<data source="Мастодон"><label>Mastodon</label></data>
<data source="Канал"><label>Канал в Telegram</label></data>
</group>
</infobox>{{#if:{{NAMESPACE}}||[[Категория:Региональные антивоенные организации]]}}<noinclude>{{doc}}</noinclude>
93a51c221e0edb68ed26176ca994339c9b21d237
Шаблон:РегОрг/doc
10
53
172
80
2023-01-01T19:32:28Z
CyberTailor
2
/* Образцы для копирования */ Ссылки на мастодон
wikitext
text/x-wiki
Шаблон для региональных организаций.
== Образцы для копирования ==
'''Полный вариант'''
<nowiki>{{РегОрг |Лого= |Название= |Регион= |Деятельность= |Сайт= |Мастодон= |Канал=}}</nowiki>
'''Полный вариант, многострочный'''
<nowiki>{{РегОрг
|Лого =
|Название =
|Регион =
|Деятельность =
|Сайт =
|Мастодон =
|Канал =
}}</nowiki>
1e1cb78d2301680b4512a82bd5cf44ba391e0703
Шаблон:Инстаграм
10
38
173
53
2023-01-01T19:33:48Z
CyberTailor
2
bibliogram.art больше не работает
wikitext
text/x-wiki
[https://instagram.com/{{{1}}} @{{{1}}}]<noinclude>{{doc}}</noinclude>
3031e725f5ac285748d8ff3dc2ec569d5d2f2190
Шаблон:Мастодон
10
93
174
2023-01-01T19:35:51Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
[https://{{{1}}}/@{{{2}}} @{{{2}}}@{{{1}}}]<noinclude>{{doc}}</noinclude>
6c7592e32fd727f910065ab6b1872a74aa62b460
Шаблон:Инстаграм/doc
10
57
175
86
2023-01-01T19:37:17Z
CyberTailor
2
bibliogram.art больше не работает
wikitext
text/x-wiki
== Параметры ==
'''<code><nowiki>{{Инстаграм|<окончание URL>}}</nowiki></code>''', где:
* <code><окончание URL></code> — строка, добавляемая к ''<nowiki>https://instagram.com/</nowiki>'' при формировании ссылки.
b9be75cb8312a0972312b339ea6f485c02c4c2ee
Шаблон:Мастодон/doc
10
94
176
2023-01-01T19:40:56Z
CyberTailor
2
Новый шаблон
wikitext
text/x-wiki
== Параметры ==
'''<code><nowiki>{{Мастодон|<сервер>|<пользователь>}}</nowiki></code>''', где:
* <code><сервер></code> — имя узла совместимого с Mastodon сервера (вторая часть адреса).
* <code><пользователь></code> — имя пользователя, без ''@''
== Пример ==
<code><nowiki>{{Мастодон|mastodon.social|Gargron}}</nowiki></code>
f620a230ef36ff807c052e5bdda4af75e4ece965
Тюменское движение НЕТВОЙНЕ
0
17
177
122
2023-01-01T19:43:15Z
CyberTailor
2
Мастодон
wikitext
text/x-wiki
{{неверный заголовок|Тюменское движение #НЕТВОЙНЕ}}
{{РегОрг
|Лого=Image:Nowar72_logo.jpg
|Название=Тюменское движение #НЕТВОЙНЕ
|Регион=Юг Тюменской области
|Деятельность=
* [[Митинг|Уличные акции]]
* Расклейка [[листовка|листовок]] и [[стикер]]ов
* Поддержка политзаключённых
|Сайт=https://nowar72.info
|Мастодон={{Мастодон|kolektiva.social|nowar72}}
|Канал={{Канал|nowar72}}
}}
'''Тюменское движение #НЕТВОЙНЕ''' — независимая антивоенная организация.
== История ==
Были одними из организаторов [[митинг]]ов 6 и 13 марта в Тюмени. В обоих случаях акции провести не удалось из-за оцепления площади полицией.
== Известные активисты ==
* [[Мартюшев, Кирилл Игоревич|Кирилл Мартюшев]] — политзаключённый<ref>{{cite web|url=https://novayagazeta.ru/articles/2022/03/07/ugolovnyi-kodeks-mira|title=Уголовный кодекс «мира»|date=2022-03-07}}</ref>.
== Примечания ==
{{примечания}}
933f1c576ae6e6e51f69ebe4d063f76e1c26fd40
189
177
2023-04-11T08:32:55Z
63.250.44.59
0
Новый сайт
wikitext
text/x-wiki
{{неверный заголовок|Тюменское движение #НЕТВОЙНЕ}}
{{РегОрг
|Лого=Image:Nowar72_logo.jpg
|Название=Тюменское движение #НЕТВОЙНЕ
|Регион=Юг Тюменской области
|Деятельность=
* [[Митинг|Уличные акции]]
* Расклейка [[листовка|листовок]] и [[стикер]]ов
* Поддержка политзаключённых
|Сайт=https://nowar72.github.io
|Мастодон={{Мастодон|kolektiva.social|nowar72}}
|Канал={{Канал|nowar72}}
}}
'''Тюменское движение #НЕТВОЙНЕ''' — независимая антивоенная организация.
== История ==
Были одними из организаторов [[митинг]]ов 6 и 13 марта в Тюмени. В обоих случаях акции провести не удалось из-за оцепления площади полицией.
== Известные активисты ==
* [[Мартюшев, Кирилл Игоревич|Кирилл Мартюшев]] — политзаключённый<ref>{{cite web|url=https://novayagazeta.ru/articles/2022/03/07/ugolovnyi-kodeks-mira|title=Уголовный кодекс «мира»|date=2022-03-07}}</ref>.
== Примечания ==
{{примечания}}
61b9467d49f02f895c522b7bd839f674aa505358
Мартюшев, Кирилл Игоревич
0
35
181
140
2023-01-30T14:32:34Z
CyberTailor
2
Информация о месте учёбы
wikitext
text/x-wiki
{{Политзек
|ФИО=Кирилл Игоревич Мартюшев
|Город=Тюмень
|Деятельность=студент
|Статья=280, часть 2
|Следователь=Анатолий Сухарев
|Адвокат=Павел Руснаков
|ДатаРождения=11.04.1999
|Регион=Тюменская область
|Учреждение=СИЗО-1 Тюмень
}}
'''Кирилл Игоревич Мартюшев''' — политзаключённый, студент, активист.
== Личная жизнь ==
До ареста учился на ветеринарного врача в Государственном аграрном университете Северного Зауралья.
Находясь в СИЗО, сделал предложение своей девушке.
== См. также ==
* [[:Категория:Письма Кириллу Мартюшеву|Письма Кириллу Мартюшеву]]
== Ссылки ==
* [https://taplink.cc/freekirill Сайт «Свободу Кириллу Мартюшеву!»]
41f341355d77834e639877cec14106924b832f94
182
181
2023-01-30T14:34:11Z
CyberTailor
2
Приговор
wikitext
text/x-wiki
{{Политзек
|ФИО=Кирилл Игоревич Мартюшев
|Город=Тюмень
|Деятельность=студент
|Статья=280, часть 2
|Следователь=Анатолий Сухарев
|Адвокат=Павел Руснаков
|ДатаРождения=11.04.1999
|Регион=Тюменская область
|Учреждение=СИЗО-1 Тюмень
}}
'''Кирилл Игоревич Мартюшев''' — политзаключённый, студент, активист.
== Личная жизнь ==
До ареста учился на ветеринарного врача в Государственном аграрном университете Северного Зауралья.
Находясь в СИЗО, сделал предложение своей девушке.
== Уголовное дело ==
30 января 2023 года судья Центрального районного суда Константин Везденев приговорил Мартюшева к трём годам лишения свободы с отбыванием наказания в колонии общего режима, а также запретил администрировать интернет-сайты в течение двух лет.
== См. также ==
* [[:Категория:Письма Кириллу Мартюшеву|Письма Кириллу Мартюшеву]]
== Ссылки ==
* [https://taplink.cc/freekirill Сайт «Свободу Кириллу Мартюшеву!»]
d7c3039bc328b11651317695c266dd95ae641540
183
182
2023-01-30T14:40:34Z
CyberTailor
2
/* Уголовное дело */ источники
wikitext
text/x-wiki
{{Политзек
|ФИО=Кирилл Игоревич Мартюшев
|Город=Тюмень
|Деятельность=студент
|Статья=280, часть 2
|Следователь=Анатолий Сухарев
|Адвокат=Павел Руснаков
|ДатаРождения=11.04.1999
|Регион=Тюменская область
|Учреждение=СИЗО-1 Тюмень
}}
'''Кирилл Игоревич Мартюшев''' — политзаключённый, студент, активист.
== Личная жизнь ==
До ареста учился на ветеринарного врача в Государственном аграрном университете Северного Зауралья.
Находясь в СИЗО, сделал предложение своей девушке.
== Уголовное дело ==
30 января 2023 года судья Центрального районного суда Константин Везденев приговорил Мартюшева к трём годам лишения свободы с отбыванием наказания в колонии общего режима, а также запретил администрировать интернет-сайты в течение двух лет<ref>{{cite web|url=https://nashgorod.ru/news/2023-01-30/v-tyumeni-sud-prigovoril-kirilla-martyusheva-k-3-godam-lisheniya-svobody-video-2650008|title=В Тюмени суд приговорил Кирилла Мартюшева к 3 годам лишения свободы. Видео|author=Наш город|date=2023-01-30}}</ref><ref>{{cite web|url=https://72.ru/text/gorod/2023/01/30/72016805/|title=Три года за видео. В Тюмени осудили участника антивоенного митинга|author=72.RU|date=2023-01-30}}</ref>.
== См. также ==
* [[:Категория:Письма Кириллу Мартюшеву|Письма Кириллу Мартюшеву]]
== Ссылки ==
* [https://taplink.cc/freekirill Сайт «Свободу Кириллу Мартюшеву!»]
8625c27b49b47acfb99e271422f29acfbfea86f2
Социалисты против войны
0
85
187
145
2023-04-09T06:15:24Z
CyberTailor
2
/* НЕВОЙНА */ Взлом канала
wikitext
text/x-wiki
{{Орг
|Идеология=социализм, коммунизм
|Деятельность=
* Создание медиа
}}
'''Социалисты против войны''' ― коалиция антивоенных левых сил.
== Проекты ==
=== НЕВОЙНА ===
Информационный ресурс коалиции в формате Telegram-канала ({{Канал|nevoina2}}). Кроме освещения протестов публикует также эксклюзивную аналитику, интервью, агитматериалы.
7 апреля 2023 года старый канал был взломан, а все посты удалены.
== Галерея ==
<gallery>
Image:Narodpv_logo.svg|Логотип медиа «НЕВОЙНА»
</gallery>
== Ссылки ==
* [https://telegra.ph/Manifest-koalicii-Socialisty-protiv-vojny-03-03-2 Манифест коалиции]
d580b371dd6131024d8cc99e3b7428fe2d1bee95
188
187
2023-04-09T06:15:56Z
CyberTailor
2
/* НЕВОЙНА */ Источник
wikitext
text/x-wiki
{{Орг
|Идеология=социализм, коммунизм
|Деятельность=
* Создание медиа
}}
'''Социалисты против войны''' ― коалиция антивоенных левых сил.
== Проекты ==
=== НЕВОЙНА ===
Информационный ресурс коалиции в формате Telegram-канала ({{Канал|nevoina2}}). Кроме освещения протестов публикует также эксклюзивную аналитику, интервью, агитматериалы.
7 апреля 2023 года старый канал был взломан<ref>https://t.me/narodpv/3116</ref>, а все посты удалены.
== Галерея ==
<gallery>
Image:Narodpv_logo.svg|Логотип медиа «НЕВОЙНА»
</gallery>
== Ссылки ==
* [https://telegra.ph/Manifest-koalicii-Socialisty-protiv-vojny-03-03-2 Манифест коалиции]
8d05518133f661498d41ca1af39b0cf64de48593
ОЧНИСЬ!
0
73
191
130
2023-05-03T18:42:02Z
Свитсаммерчайлд
18
Исправлена ссылка на тг канал
wikitext
text/x-wiki
{{Медиа
|Название=<nowiki>#ОЧНИСЬ!</nowiki>
|Год=2022
|Сайт=https://wakeuprussia.onrender.com
|Канал={{Канал|wakeup_russia}}
}}
{{неверный заголовок|#ОЧНИСЬ!}}
'''#ОЧНИСЬ!''' — проект, описывающий себя как общественное движение сознательных граждан России.
== Проекты ==
=== reMap ===
В марте 2022 года был запущен сайт [http://remap-ru.com reMap] — интерактивная карта протестов в России. 31 мая 2022 года заблокирован<ref>{{cite web|url=https://reestr.rublacklist.net/record/4455202/|title=Реестр запрещённых сайтов}}</ref> по решению Генпрокуратуры.
=== «Цена войны» ===
В августе 2022 года был запущен сервис «[https://warcost.life/ Цена войны]», позволяющий оценить государственные расходы на военные действия.
== Примечания ==
{{примечания}}
== Ссылки ==
* [https://t.me/wakeup_russia/682 Пост-знакомство]
* [https://t.me/wakeup_russia/1367 Навигация по каналу]
2d634cf468b9683db5a8a114c6924b8cb8004db0
Самара против войны
0
95
192
2023-05-14T03:13:59Z
CyberTailor
2
Новая страница
wikitext
text/x-wiki
{{РегОрг
|Регион=Самарская область
|Деятельность=
* [[Митинг|Уличные акции]]
* Публикация петиций
* Поддержка политзаключённых
|Канал={{Канал|nowar63}}
}}
'''Самара против войны''' — городская инициативная антивоенная группа.
eaa9396b7dcc46593ace67ec42d63f426045dab8
Смоленск. Против войны
0
67
194
114
2023-05-14T03:17:36Z
CyberTailor
2
слово "антивоенная"
wikitext
text/x-wiki
{{РегОрг
|Регион=Смоленская область
|Деятельность=
* Организация публичных собраний
* Поддержка политзаключённых
|Канал={{Канал|SmolenskProtiv}}
}}
'''Смоленск. Против войны''' — городская инициативная антивоенная группа.
95dd5334b0d4f9aa3a3c105a4737956110266855
Письмо ZTMAIL3188193
0
96
195
2023-07-23T13:37:24Z
CyberTailor
2
Новое письмо
wikitext
text/x-wiki
== Письмо ==
Привет ещё раз! Да, совсем забыла про «Росузник», да и им не так удобно пользоваться. Во ФСИН-Письмо с некоторых пор даже личный кабинет появился, уведомления о каждом изменении статуса есть, а ещё можно заказать ответ без письма.
Книги хорошие! В неволе в принципе делать и нечего, только читать да физкультурой заниматься. Твоё письмо пестрит отсылками к «1984», а между тем книги Оруэлла неформально запретили закупать и принимать библиотекам, вместе с другими неугодными авторами. Почему политики не понимают, что антиутопии - это не руководства к действию!
Большие улитки называются ахатины, у меня были мысли таких завести. Ну, улитки это такие биологические машины: они умеют только ползать и размножаться, но делают это очень хорошо! Всякая живность (включая улиток-физ) появилась вместе с растениями. Там личинки были наверняка. Так всегда бывает, если сразу заносить, без карантина. Креветочники вот планарий не любят, они креветок обижают. Циклопов все любят, особенно поедающие их рыбки.
А я уехала из Екатеринбурга в маленький город - тут дешевле жить. Были мысли пойти избираться в гордуму, но я не потяну по деньгам и времени. Россия наносит удары по Украине, Украина - по России. Вот так и будет продолжаться, пока не начнут мирные переговоры.
Передаю с письмом частичку тепла и уюта. Скучаешь по этому, наверное. Пускай тогда время летит быстрее, и чтобы про тебя не забывали. До следующего письма!
== Ответ ==
20.06 отправлю
Здравствуй, Аня! Эх вы, вольные обитатели, всё со своими «удобно-неудобно», с правами своими какими-то придуманными! Хехе, у меня был интересный диалог с конвоиршей:
― Почему вы, когда в тюрьму попадаете, все о своих правах вспоминаете? Начинаете требовать что-то (я не говорю конкретно про тебя)… Почему вам спокойно не живётся, вот как нам? Ничего не просим, живём как-то… [Видела бы ты мою маньячью улыбку на протяжении всего этого]
― Нужно просто потерпеть, просто-просто потерпеть. И все мы отправимся в рай, и все мы отправимся в рай. ― ответил я прозой.
― Прямо все-все? — не поняла она сказанного.
А «1984», видимо, я тогда только прочёл и находился под впечатлением.
Ну точно, ахатины.
Выборы ушли на другой план, и это правильно, потому что помимо денег и времени оное ещё облагается последствиями.
Как ни странно, грустно, больно, прискорбно, обидно, досадно, но ладно — я потерял всякий интерес к войнушке, и кто в каком количестве кого убьёт — вероятно, это и есть цель моей посадки, а теперь я достоин быть гражданином России! Переполненный ненавистью, безразличием, отстранённый и десоциализированный ― вот такие нам нужны.
Чего-то, кстати, раньше у меня всякие малявочки склизкие, хитиновые отвращение вызывали, но зато теперь, хаха, похоже уже не способны.
Благодарю за пожелания, Анют, и тайком пронесённые в письме запрещённые частички! Не знаю уже конкретно, по чему я скучаю, а нет, по одиночеству 100%. Обнимаю! Светлого настроения и тёплых дней!
== Ссылки ==
* [[:File:Мартюшев ZTMAIL3188193.pdf|Оригинал письма]]
[[Категория:Письма Кириллу Мартюшеву]]
ea3f62c6da0cc38d4cef8cc2e20779e986aab11a
Письмо №12197896
0
97
196
2023-07-27T04:46:44Z
CyberTailor
2
Новое письмо
wikitext
text/x-wiki
== Письмо ==
Привет, Кирилл! Давно не писала, потому что экономлю каждую копейку.
Я сейчас в Екатеринбурге живу, снова курьерю. Оперный театр у нас замечательный, хожу на постановки. И вот в дневной стационар записали. В общем, живу помаленьку (но не учусь пока).
Конечно, приговор для всех был шоком, буду следить за апелляцией. Вот есть такое, что сидеть за пределами Москвы и Питера гораздо сложнее: кроме местных СМИ никто не пишет, а столичным правозащитникам и активистам тоже нет дела до какой-то там Сибири… С одной стороны, это и к лучшему. Нет толпы тех, которые "предлагаю вам помощь и поддержку", а потом отваливаются или предают. Главное, чтобы были надёжные друзья и верная семья. Но с другой - с финансами так себе… Поэтому вряд ли ништяки будут. Но "Мемориал" признал тебя политзаключённым, так что можешь хотя бы ждать писем от новых сочувствующих.
А как там с книгами? Рекомендую вот Эриха Фромма, "Бегство от свободы". А Борис Кагарлицкий очень хорошо пишет с точки зрения мир-системного анализа. Маркузе, Бодрийяр тоже достойны упоминания. Кстати, Антонио Грамши свои главные труды написал пока сидел в тюрьме при режиме Муссолини.
Недавно молодой историк Александр Штефанов снял большой фильм "Обыкновенная денацификация" по материалам своей поездки в Мариуполь, Донецк и Макеевку (в составе гуманитарной миссии). Z-публика в истерике, конечно, требует наказать и посадить. Говорят, что он "снимал фейки". Это как? Вот идёт фейк по улице, а он достал камеру и снимает! И смех, и грех.
В Тюмени и в Екатеринбурге 10 сентября пройдут выборы муниципальных депутатов. Я надеюсь, что будет жарко!
Закончу наблюдениями за аквариумом. Сначала там жили одни улитки (физы и катушки) и росли водоросли, но потом я купила растений. Сейчас там живут рачки-циклопы, планарии, турбеллярии, нематоды и аннелиды! Можно залипать сутками в эту маленькую экосистему. А она причём самоподдерживающаяся, то есть кормить и чистить не нужно.
Планарии - плоские червячки, ночные хищники. Они вечером из камней выползают и кого-то съедают (засасывают выдвижной глоткой, рта у них нет). У них прикольные рожки и глазки. Циклопов, которых ещё называют "прыгунчиками", развелось неимоверно (они тоже хищники, питаются планктоном). Стоит купить мальков гуппи, чтобы они их поедали. Детритные черви питаются подножным кормом, как и улитки.
Ну, Кирилл, до следующего письма. Как говорится: живёшь в сверхдержаве - сверхдержись! Российский суд может тебя сколько угодно осуждать, но суд истории точно оправдает.
== Ответ ==
[[Image:Мартюшев 12197896.jpeg|thumb|Оригинал письма]]
18.03; 20.03 отправлю
Аня, здравствуй! Ой много воды утекло с того времени, ― последнее же ты с баб Валей и Стёпой скидывала письмо? ― и я уже превращаюсь планомерно и бесповоротно в зечару.
А ты можешь ещё сэкономить и воспользоваться Росузником, если будет настроение и тема для разговора. Не болей!
А чего за апелляцией следить: надеюсь, мне дадут сказать без скайпа, а вживую, ну а результат уже известен, если больше не насыпят.
Хе, да мне все пишут: и из столиц России, и из Германии с Италией ― всё чётко!
"С финансами так себе", ― имеешь в виду, кушать нечего тут? Согласен!
О, с книгами. Я тут прочёл Э. Берн "Люди, которые играют в игры", Р. Лихи "Лекарство от нервов", Э. Фромм "Анатомия человеческой деструктивности" ("Бгество от свободы" ― слышал рецензию, но сейчас не понятно, где она), Дж. Оруэлл "1984", О. Хаксли "О дивный новый мир", Солженицын "В круге первом" и пр. Сейчас "Бесы" Достоевского.
Слушай, ты мне очень интересный список авторов назвала, но тут хорошую книгу выловить ― дорогого стоит: таких нужно жёстко шерстить. Много чего ещё с двоемыслящим населением увидеть, неприятного в особенности. Но вот слышал только вот про расследование по Буче - это нужно обнародовать в любом случае.
Про выборы я не уверен: во-первых, осень уже будет, прохладно. А так я был на прошлых (в 21 году?), топил за УГ, а в итоге ― пассивные пролы… Но там была дума, так что посмотрим.
Фига себе ты микробиом себе развела! Я только видел давненько улиток больших, они называются ещё как-то и размножаются много, а чтобы не надо было мучаться, куда их отдавать ― яйца в морозилку клали. Но это не по мне, для меня мягкие и пушистые в приоритете, один есть такой. Может сейчас я уже проще к маленьким и склизким, столько повидал считай. А ты же рачков и планарий докупила, не могли же они из улиток выпочковаться? Пропустила этот пункт, и я совсем хронологию потерял.
Держусь сверхдержавно, спасибо! Главное, чтобы ещё дерьма не накинули и дали уехать после.
Обнял! Тёплых солнечных лучей! И светлых денёчков!
[[Категория:Письма Кириллу Мартюшеву]]
a5741d05d5833a9bda049cf9f1d21247192da9a5
197
196
2023-07-27T04:50:37Z
CyberTailor
2
кавычки
wikitext
text/x-wiki
== Письмо ==
Привет, Кирилл! Давно не писала, потому что экономлю каждую копейку.
Я сейчас в Екатеринбурге живу, снова курьерю. Оперный театр у нас замечательный, хожу на постановки. И вот в дневной стационар записали. В общем, живу помаленьку (но не учусь пока).
Конечно, приговор для всех был шоком, буду следить за апелляцией. Вот есть такое, что сидеть за пределами Москвы и Питера гораздо сложнее: кроме местных СМИ никто не пишет, а столичным правозащитникам и активистам тоже нет дела до какой-то там Сибири… С одной стороны, это и к лучшему. Нет толпы тех, которые «предлагаю вам помощь и поддержку», а потом отваливаются или предают. Главное, чтобы были надёжные друзья и верная семья. Но с другой ― с финансами так себе… Поэтому вряд ли ништяки будут. Но «Мемориал» признал тебя политзаключённым, так что можешь хотя бы ждать писем от новых сочувствующих.
А как там с книгами? Рекомендую вот Эриха Фромма, «Бегство от свободы». А Борис Кагарлицкий очень хорошо пишет с точки зрения мир-системного анализа. Маркузе, Бодрийяр тоже достойны упоминания. Кстати, Антонио Грамши свои главные труды написал пока сидел в тюрьме при режиме Муссолини.
Недавно молодой историк Александр Штефанов снял большой фильм «Обыкновенная денацификация» по материалам своей поездки в Мариуполь, Донецк и Макеевку (в составе гуманитарной миссии). Z-публика в истерике, конечно, требует наказать и посадить. Говорят, что он «снимал фейки». Это как? Вот идёт фейк по улице, а он достал камеру и снимает! И смех, и грех.
В Тюмени и в Екатеринбурге 10 сентября пройдут выборы муниципальных депутатов. Я надеюсь, что будет жарко!
Закончу наблюдениями за аквариумом. Сначала там жили одни улитки (физы и катушки) и росли водоросли, но потом я купила растений. Сейчас там живут рачки-циклопы, планарии, турбеллярии, нематоды и аннелиды! Можно залипать сутками в эту маленькую экосистему. А она причём самоподдерживающаяся, то есть кормить и чистить не нужно.
Планарии - плоские червячки, ночные хищники. Они вечером из камней выползают и кого-то съедают (засасывают выдвижной глоткой, рта у них нет). У них прикольные рожки и глазки. Циклопов, которых ещё называют "прыгунчиками", развелось неимоверно (они тоже хищники, питаются планктоном). Стоит купить мальков гуппи, чтобы они их поедали. Детритные черви питаются подножным кормом, как и улитки.
Ну, Кирилл, до следующего письма. Как говорится: живёшь в сверхдержаве - сверхдержись! Российский суд может тебя сколько угодно осуждать, но суд истории точно оправдает.
== Ответ ==
[[Image:Мартюшев 12197896.jpeg|thumb|Оригинал письма]]
18.03; 20.03 отправлю
Аня, здравствуй! Ой много воды утекло с того времени, ― последнее же ты с баб Валей и Стёпой скидывала письмо? ― и я уже превращаюсь планомерно и бесповоротно в зечару.
А ты можешь ещё сэкономить и воспользоваться Росузником, если будет настроение и тема для разговора. Не болей!
А чего за апелляцией следить: надеюсь, мне дадут сказать без скайпа, а вживую, ну а результат уже известен, если больше не насыпят.
Хе, да мне все пишут: и из столиц России, и из Германии с Италией ― всё чётко!
«С финансами так себе», ― имеешь в виду, кушать нечего тут? Согласен!
О, с книгами. Я тут прочёл Э. Берн «Люди, которые играют в игры», Р. Лихи «Лекарство от нервов», Э. Фромм «Анатомия человеческой деструктивности» («Бегство от свободы» ― слышал рецензию, но сейчас не понятно, где она), Дж. Оруэлл «1984», О. Хаксли «О дивный новый мир», Солженицын «В круге первом» и пр. Сейчас «Бесы» Достоевского.
Слушай, ты мне очень интересный список авторов назвала, но тут хорошую книгу выловить ― дорогого стоит: таких нужно жёстко шерстить. Много чего ещё с двоемыслящим населением увидеть, неприятного в особенности. Но вот слышал только вот про расследование по Буче ― это нужно обнародовать в любом случае.
Про выборы я не уверен: во-первых, осень уже будет, прохладно. А так я был на прошлых (в 21 году?), топил за УГ, а в итоге ― пассивные пролы… Но там была дума, так что посмотрим.
Фига себе ты микробиом себе развела! Я только видел давненько улиток больших, они называются ещё как-то и размножаются много, а чтобы не надо было мучаться, куда их отдавать ― яйца в морозилку клали. Но это не по мне, для меня мягкие и пушистые в приоритете, один есть такой. Может сейчас я уже проще к маленьким и склизким, столько повидал считай. А ты же рачков и планарий докупила, не могли же они из улиток выпочковаться? Пропустила этот пункт, и я совсем хронологию потерял.
Держусь сверхдержавно, спасибо! Главное, чтобы ещё дерьма не накинули и дали уехать после.
Обнял! Тёплых солнечных лучей! И светлых денёчков!
[[Категория:Письма Кириллу Мартюшеву]]
9e308013c824a388c6c0d1ebc7a4ba781a0d45fd
Антивоенный комитет Кубани
0
23
198
113
2023-08-07T12:20:13Z
85.175.140.121
0
Добавлено содержимое
wikitext
text/x-wiki
{{РегОрг
|Регион=Краснодарский край
|Деятельность=
* Расклейка [[листовка|листовок]] и [[стикер]]ов
|Канал={{Канал|navalnyKRD}}
}}
'''Антивоенный комитет Кубани''' — антивоенная организация, созданная сторонниками [[Алексей Навальный|Алексея Навального]]. Антивоенный комитет Кубани выступает против войны в Украине и путинизма, называя Россию "Империей"
== Пожертвования ==
Комитет собирает деньги на печать листовок через [bitcoin:bc1q2few9favd33w6swec882kpuy70affs6cld27fv биткоин-кошелёк] и на карту Сбербанка <code>5469 9804 2048 5035</code><ref>https://t.me/navalnyKRD/3702</ref>.
== Примечания ==
{{примечания}}
4116f2292bf9fa4d31137a7daba70d42c4b53f58